Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


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


Advertisement
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
Advertisements
 

 

 

DMCA.com