What will be the output of the following Java program?
class c
{
public void main( String[] args )
{
System.out.println( "Hello" + args[0] );
}
}
class c
{
public void main( String[] args )
{
System.out.println( "Hello" + args[0] );
}
}A. Hello c
B. Hello
C. Hello world
D. Runtime Error
Answer: Option D
Related Questions on Data Types and Variables
Which of the following is not a valid identifier for a Java variable?
A. my_var
B. _myVar
C. 3rdVar
D. $var

Join The Discussion