u public class MyFirstExample
{
u public static void main (
String args[]){
u System.out.println(“Hello
World”);
u }
u }
uFirst line declares a new class
ØSpecifier public
Ø{ } represent the start and end of each code block
uSecond line declares a method - main()
ØJVM looks for method main( ) when application
starts
Østatic declaration needed because main() method called before
any objects are created
Øvoid is a declaration of return type
ØRemainder of line used to pass parameters to main()method
uThird line calls a library