what is given output?
1 Answer(s)      6 years and 3 months ago
Posted in : Java Interview Questions

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");