Sunday, February 13, 2011

Java questions and answers


Java multiple choice objective type questions for written test and answers

(1)


public class ArrayDemo {


public static void main(String[] args) {


long [][]arr=new long [2][];


arr[0]=new int[2];


arr[1]=new int[3];


arr[0][1]=015L;


System.out.println(arr[0][1]);


}


}


What will be output of above program?


(a)13


(b)15


(c)0

No comments:

Post a Comment