In the following example:
public class JavaExample
{
public static void main(String[] args)
{
system.out.println(args[0]);
}
}
when no parameter is passed
Exception given is java.lang.ArrayIndexOutOfBoundExpection
So my Question is that Why is that Exception is thrown , why not NullPointerException.
(I know when both expection thrown)
But in this case why the ArrayIndexOutofbound ????
Is that args is Declared and Intialized..???