previous | start | next

## "Hello, World" in Java

- Construct new objects with `new` operator

      new Greeter("World")

- Can invoke method on newly constructed object

      new Greeter("World").sayHello()

- More common: store object reference in object variable

      Greeter worldGreeter = new Greeter("World");

- Then invoke method on variable:

      String greeting = worldGreeter.sayHello();

previous | start | next