What will be the output of the following Java program? [code] class Alligator { public static void main(String[] args) { int

Trương Duy

New member
What will be the output of the following Java program?
Code:
 class Alligator 
 {
  public static void main(String[] args) 
   {
   int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};
   int [][]y = x;
   System.out.println(y[2][1]);
   }
 }
A. 2
B. 3
C. 7
D. Compilation Error
 

Tìm kiếm

Back
Top