{"id":25220014,"url":"https://github.com/ggleblanc2/arraysum","last_synced_at":"2026-05-14T22:37:23.293Z","repository":{"id":41285309,"uuid":"509024153","full_name":"ggleblanc2/ArraySum","owner":"ggleblanc2","description":"The code in this repository answers a Stack Overflow question that was closed","archived":false,"fork":false,"pushed_at":"2022-06-30T10:19:20.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T21:49:49.005Z","etag":null,"topics":["java-8","loops"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ggleblanc2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-30T09:54:00.000Z","updated_at":"2022-06-30T10:10:13.000Z","dependencies_parsed_at":"2022-07-07T03:33:15.712Z","dependency_job_id":null,"html_url":"https://github.com/ggleblanc2/ArraySum","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggleblanc2%2FArraySum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggleblanc2%2FArraySum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggleblanc2%2FArraySum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggleblanc2%2FArraySum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggleblanc2","download_url":"https://codeload.github.com/ggleblanc2/ArraySum/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325687,"owners_count":20920715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java-8","loops"],"created_at":"2025-02-10T21:49:50.641Z","updated_at":"2026-05-14T22:37:23.226Z","avatar_url":"https://github.com/ggleblanc2.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArraySum\n\nThe original question on [Stack Overflow](https://stackoverflow.com/questions/72805749/give-advice-on-the-2d-array-and-array-looping-in-java-please?noredirect=1#comment128607046_72805749) can be restated as follows.\n\nGiven a two-dimensional array, I wish to sum each 2 x 2 subarray and produce an output two-dimensional array.  For example, if I have the folllowing 4 x 5 input array\n\n     50  45  47  52  54\n     49  52  50  50  51\n     51  52  51  45  48\n     50  47  54  47  52\n     \nI wish to produce the following 3 x 4 output array.\n\n    196 194 199 207\n    204 205 196 194\n    200 204 197 192\n\nIn order to do this, you'll need four nested `for` loops.\n\nThe first two `for` loops will loop through the starting position of the subarray you want to sum.  The second two `for` loops will loop through the subarray, summing the values.\n\nTo the original poster: If English is not your native language, write your question and expanation in your native language and use Google translate to translate your question and expanation into English.  You need to clearly state the problem, possible inputs, and desired outputs for your question to make sense.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggleblanc2%2Farraysum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggleblanc2%2Farraysum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggleblanc2%2Farraysum/lists"}