Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TwinArrayDemo {
- public static void main (String [] args){
- int[][] numbers = {{2,5,2,
- 2,6,2,
- 8,2,3}};
- TwinArray user1 = new TwinArray(numbers);
- displayAll(user1,0);
- }//END MAIN
- //===============================================================
- public static void displayAll(TwinArray user1,int num){
- System.out.println("The sum of the array is " + user1.getTotal());
- System.out.println("The average of the array is " + user1.getAverage());
- System.out.println("The total of row " + num + " is: " + user1.getRowTotal(num));
- }
- //==================================================================
- }//END CLASS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement