السلام عليكم
اخواني لو سمحتو انا عندي سؤال يمكن يعتبر سخيف بالنسبه لللي يدرسون جافا
لكنه صعب علي
هذا السؤال:( وهو كان عباره عن تمرين فقط وليس وظيفه)
اقتباسDeclare and object two dimension integer arrays with 3 rows and varying number of elementsIn each row .First row should contain 2 elemnts, second row should contain 4elemnt and last row 3 elements .get
Input from user int different method and display those elements in separate methods. Write another method
Which display sum of elements in each row and then tell the user which row has the greatest sum?
package exercise_t;
import javax.swing.JOptionPane;
public class Exercise1 {
public static void main(String[] args) {
getColl(array);
}
public static void getColl(int array[][])
{
int array[][] =new array[3][n];
//String num=JOptionPane.showInputDialog("inter the number of coulom");
// int n=Integer.parseInt(num);
// int array[][] =new array[3][];
for(int row=0; row<array.length;row++)
{
for(int coll=0; coll<array[row].length; coll++)
System.out.print( array[row][coll]+ "\n");
}
}
}