O'Reilly logo

Java™ for Programmers: Deitel Developer Series, Second Edition by Harvey Deitel - Deitel & Associates, Inc., Paul Deitel - Deitel & Associates, Inc.

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 2. Introduction to Java Applications

What’s in a name? That which we call a rose By any other name would smell as sweet.

William Shakespeare

When faced with a decision, I always ask, “What would be the most fun?”

Peggy Walker

The chief merit of language is clearness.

Galen

One person can make a difference and every person should try.

John F. Kennedy

Objectives

In this chapter you’ll learn:

• To write simple Java applications.

• To use input and output statements.

• Java’s primitive types.

• To use arithmetic operators.

• The precedence of arithmetic operators.

• To write decision-making statements.

• To use relational and equality operators.

2.1 Introduction

2.2 Your First Program in Java: Printing a Line of Text

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