Question ID :952739447900
[TRIAL]
Given the following program, which statment is true?
class SomeClass
{
public static void main(
String args[ ] )
{
if (args.length == 0 )
{
System.out.println("no arguments") ;
}
else
{
System.out.println( args.length + " arguments.") ;
}
}
}
Ok, the answer according to J+ is that this
program will throw a null pointer exception at
runtime, but when I compile and run this class
exactly as is, I get no arguments printed.
Can someone please confirm if I am correct or not?
Thanks,
Matt