Introduction to Java
Jim White
Java Developer
$$

$$

class Greeting {
}
{} mark where class begins and endsclass Greeting {public static void main(String[] args) { }}
main()Java is case sensitive
Every line inside the method ends with ;
System.out.println("Hello!");Indentation is only used to improve readability

class PrintlnAsCalculator { public static void main(String[] args) {System.out.println(1+2);} }
3
class PrintlnAsCalculator { public static void main(String[] args) {// We can use println as a calculatorSystem.out.println(1+2); } }
3
$$
Introduction to Java