Chapter 3. Operators

   

Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Part I:  Java Foundation


You will learn about the following in this chapter:

  • All Java operators: what they are and how they are used.

  • Java Operator Precedence: what operators are evaluated first?

In the previous chapter you learned that computers think in terms of 1s and 0s, and that you can use those 1s and 0s to represent numbers, characters, and booleans. Then you learned that through Java you could create meaningful names that refer to regions of memory using variables. The next step is to take those variables and do something meaningful with them. In this chapter, you will address all the mathematical operations you can perform in Java on primitive data types.

Operators work in conjunction with operands, or the literal values or variables involved in the operation. There are unary operators, which are operators that operate on a single operand, as well as operators that operate on two or more variables.


       
    Top
     



    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net