Question Index

What will be the output of the following program.

class helloworld
    public static void main(String[] u)
        System.out.println("Hello Wrold");

Compilation error since "Hello Wrold" has spelling mistake, it should be "Hello World"
Compilation error since the class name does not contain at least one capital letter. It works fine if the class name was HelloWorld
Compilation error for some other reason
Hello Wrold



Topic: Java Sample Program - Simple Hello World Program In Java

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2016 - 2017

All Rights Reserved.

Learn Java Programming from our Experts in 30 Days