1. Hello, World!

Learning any programming language starts with the customary Hello, world! example. The Hello, world! example demonstrates the simplest code one may write and involves printing the words Hello, world! to the console. The Hello, world! example in Java is not as easy to understand as Python because printing statements to the console typically involves writing a program. The code below is a full Java program (although it does not do much). You need to get used to this program structure as it will be used repeatedly throughout this book to demonstrate how to write Java code.

1System.out.println("Hello, world!");