Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public class TwinArrayDemo {
  2.  
  3. public static void main (String [] args){
  4.  
  5. int[][] numbers = {{2,5,2,
  6. 2,6,2,
  7. 8,2,3}};
  8.  
  9. TwinArray user1 = new TwinArray(numbers);
  10. displayAll(user1,0);
  11.  
  12.  
  13. }//END MAIN
  14. //===============================================================
  15. public static void displayAll(TwinArray user1,int num){
  16.  
  17. System.out.println("The sum of the array is " + user1.getTotal());
  18. System.out.println("The average of the array is " + user1.getAverage());
  19. System.out.println("The total of row " + num + " is: " + user1.getRowTotal(num));
  20. }
  21.  
  22.  
  23.  
  24.  
  25. //==================================================================
  26. }//END CLASS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement