what is given output?

public class { public static void main(string argv[]) }.........?

View Answers

December 3, 2010 at 11:32 AM

Hi Friend,

It will give error as you haven't specify the class name through which the class is to be saved and compiled. Moreover there is a missing braces.

Anyways, the correct format is:

public class Hello{
    public static void main(String argv[]){
        System.out.println("Hello World");
    }
}

Thanks









Related Tutorials/Questions & Answers:
Advertisements