Java MCQ Questions for Placement


Q.  If you are inserting any value in the wrong index as shown below, 1. int a[]=new int[5]; 2. a[10]=50; it would result in ______.

a. NullPointerException
b. ArrayIndexOutOfBoundsException
c. ArithmeticException
d. NumberFormatException



 
 

    Discussion

Post your comment / Share knowledge