O'Reilly logo

The class of Java by Pravin Jain

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 4

Operators and Statements

In Chapter 3 we have seen the various data types used in the Java programming language. In this chapter, we discuss the various commonly used operators and statements available in the Java programming language.

4.1 OPERATORS

Most of the operators in Java work similar to C. In the following sections we discuss the operators available in Java. Assuming the knowledge of C, we do not discuss each and every operator in detail except for places where it is felt that the operators differ from C or they require an in-depth discussion. The operators in Java may be categorized as follows.

4.1.1 Arithmetic Operators

+ - * / and %

The above operators when used as binary operators can have operands of numeric types only, ...

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