O'Reilly logo

Core Java Volume I—Fundamentals, Eleventh Edition by Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Fundamental Programming Structures in Java

In this chapter

3.1 A Simple Java Program

3.2 Comments

3.3 Data Types

3.4 Variables and Constants

3.5 Operators

3.6 Strings

3.7 Input and Output

3.8 Control Flow

3.9 Big Numbers

3.10 Arrays

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 simply prints a message to console:

public class FirstSample { public static void ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required