HelloWorld source code:
1. public class HelloWorld
2. {
3. public static void main(String[] args)
4. {
5. System.out.println("Hello World");
6. }
7.}
Program Output
Code Explanation:
Hello World
1. open HelloWorld class.
2. opening bracket of the HelloWorld class.
3. start the main method body.
4. opening bracket of the main method.
5. display Hello World on the screen.
6. close the main method.
7. close the HelloWorld class.
No comments:
Post a Comment