Chapter 3

Fundamental Programming Structures in Java

In this chapter

At this point, you should have successfully installed the JDK and executed the sample programs from Chapter 2. It’s time to start programming. This chapter shows you how the basic programming concepts such as data types, branches, and loops are implemented in Java.

3.1 A Simple Java Program

Let’s look more closely at one of the simplest Java programs you can have—one that merely prints a message to console:

public class FirstSample { public static void main(String[] args) ...

Get Core Java, Volume I: Fundamentals, 12th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.