1 |
public class Hello |
2 |
{ |
3 |
public static void main(String[]
args) |
4 |
{ |
5 |
// display a greeting
in the console window |
6 |
System.out.println("Hello,
World!"); |
7 |
} |
8 |
} |
Example:
Purpose:To invoke a method of an object and supply any additional parameters |