1 2 3 4 5 6 7 8 9 |
package practice; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } } |
1 |
Hello World |
Important Keyword | Description |
public | Classes, methods or data members which are declared as public accessible from everywhere in the program. There is no restriction on the scope of public data members. |
static | A static method can be invoked without the need for creating an instance of a class. |