UsmanAli
main() syntax
1 Answer(s)      2 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,
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 Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.