Java
  Home arrow Java arrow Java Operators
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Java Operators
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2007-10-22

    Table of Contents:
  • Java Operators
  • Assignment Operators
  • Doing More Math with Assignment Operators
  • Forming a Relationship with Operators

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Java Operators
    (Page 1 of 4 )

    It's been about a month or so since we finished our beginning Java series, so I'm sure you're ready for more. This time, I am going to teach you to work with operators in Java. When I am finished, you will be able to do complex mathematical equations, add one string of text to another, and build programs so powerful you will be able to put thousands of hard working Americans out of work with the push of a button.

    So look out global economy, here we come.

    Operators

    There used to be a time when you called "Information" on the phone and you heard a real, honest-to-goodness voice. All that is done with. Now you talk to a computer, and the funny thing about computers is that they have no ears. So when I call up and, for example, ask for the number to Annie's Pizza, it's little surprise that the “operator” comes back to me with the number to Danny's Pizza, no matter how much emphasis I place on the A in Annie.

    Unlike modern computer operators, Java Operators aren't annoying, and like the phone operators of old, are actually helpful. You have used operators your entire life, and their function is simple: they allow you to manipulate data. And let's face it, what good is data if you can't manipulate it?

    There are several types of operators, but before we go into them, you should understand a little thing we in the biz call operator precedence. Precedence determines in which order operators execute. If that's not clear, it will be in a few moments.

    But first, look at this beautiful table designed by yours truly:


    Operator Type

    Operator Precedence

    postfix

    expr++ expr--

    unary

    ++expr –expr +expr -expr ~ !

    multiplicative

    * / %

    additive

    + -

    shift

    << >> >>>

    relational

    < > <= >= instanceof

    equality

    “==” !=

    bitwise AND

    &

    bitwise exclusive OR

    ^

    bitwise inclusive OR

    |

    logical AND

    &&

    logical OR

    ||

    ternary

    ? :

    assignment

    “=” += -= *= /= %= &= ^= |= <<= >>= >>>=

    The above table lists the operators and their precedence in order.

    More Java Articles
    More By James Payne


       · thanks for dropping by to read this installment of Java Operators. It covers the...
     

       

    JAVA ARTICLES

    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...
    - Java Operators
    - Primitive Data Types and Basic Language Rule...
    - Java and Object-Oriented Programming
    - Java Beginning Programming
    - Gaming Development Setup
    - Using RPC-Style Web Services with J2EE
    - Integrating XML with J2EE
    - Taming Tiger: Concurrent Collections

    Iron Speed
     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway