13
Question Question 13
Write a code segment that finds the largest integer in this two-dimensional array.
int data[][] = new int[5][5];int l = data[0][0];
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (data[i][j] > l) {
l = data[i][j];
}
}
}
System.out.println("Largest Element = " + l);