Monday, 1 April 2013

Array - 1



package net.dharmaraj;

public class TestLocal {
public static void main(String args[]) {
String s[] = new String[6];
System.out.println(s[5]);
}
}



What is the output of the following code?  
  
A) A null is printed  
B) Compile time error 
C) Exception is thrown  
D) null followed by 0 is printed on the screen  

Answer:-A

No comments:

Post a Comment