•/* Sample program to
write "Hello World" */
•class HelloWorld {
• // No data declarations in this class
• public static void main(String[] arguments) {
• // No data declarations in this method
• System.out.println("Hello
World !");
• }
•}
Most instructions in a Java program are
method activations
Method names are preceded by the name of
the class they belong to
System.out.println is a method to write
its parameter on the screen
Strings are groups of characters between
" quotes "