Chapter 3Fundamental Programming Structures in Java

At this point, we are assuming that you successfully installed the JDK and were able to run the sample programs that we showed you in 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, 11th 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.