UsmanAli
main() syntax
1 Answer(s)      5 years and 11 months ago
Posted in : Java Beginners
Hi,

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

Regards,
UsmanAli Shaik,
Advertisement
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:
Advertisement