Course Hero Logo

RowSum.java - public class RowSum { public static void main...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 out of 1 page.

public class RowSum {public static void main(String[] args) {//Add dimensions to new arrayint[][] nums = new int[5][3];//add variable that we can multiply byint multi =2;//nested for loop to populate the array (starts with row)for (int row = 0; row < nums.length; row++) {//now we go for the collumnfor (int col = 0; col < nums[row].length; col++) {nums[row][col] = multi;//mulitply by 2 for nextmulti *= 2;}}//print out arrayfor (int row = 0; row < nums.length; row++) {
End of preview. Want to read the entire page?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Ms.Moore
Tags
Algebra, Addition, new int, public class RowSum

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture