Tuesday, March 26, 2013

Java;Notes - 10.) Java Parenthesis and Operator Hierarchy

Just like in math Java has a certain order in which things must be done. Remember the phrase from algebra: "Do whats in parenthesis first" the same rule almost applies to Java only its more or less relative to how the code is formatted and how the program will read it. Here is another nice little chart to look at that explains the following:

Basically what this means is that: a && b || c would actually in code be along the lines of: (a && b) || c and so on down the line.

No comments:

Post a Comment