main() syntax

main() syntax

Hi,

I would like to know the complete structure of the main() in jdk1.5
with sample program.

Regards,
UsmanAli Shaik,
View Answers

July 9, 2010 at 10:44 AM

Hi Friend,

Structure of Java program:

[package declaration]

[import statements]

[class declaration]
[main() method]

For Example:

package roseindia;

import java.lang;

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

For more information, visit the following link:

http://www.roseindia.net/java/

Thanks









Related Tutorials/Questions & Answers:

Ads