class HelloWorld
{
public static void main(String t[])
{
System.out.println("Hello World");
}
}
A. |
Program does not compile since the keyword class should start with capital C
|
B. | Hello World |
C. |
Program does not compile since the variable name of the arguments is t. The name should be either s or args
|
D. | HelloWorld |
![]() |
Class PrintHello { |
![]() |
class printhello { |
![]() |
System.out.println("Hello World"); |
![]() |
public static void main(String arguments[]) { |
![]() |
} } |
![]() |
System.out.println("Hello Universe"); |
class hellouniverse
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
A. |
The program causes a compilation error since the class name is in small letters. It will work if the class name was HelloUniverse
|
B. |
The program causes a compilation error since the class name is hellouniverse , but we are printing Hello World
|
C. | Hello Universe |
D. | Hello World |
A. | integer |
B. | float |
C. | char |
D. | double |
![]() |
{ Public Static Void Main() { System.out.println("I Love Java"); } } |
![]() |
class PrintJava |
![]() |
{ public static void main(String s[]) { System.out.println("I Love Java"); } } |
![]() |
{ Public static void Main(String args[]) { System.out.println("i love java"); } } |