Monday, March 7, 2011

Shorter is better!

There are classes with special values stored for MIN_VALUE and MAX_VALUE which makes life a lot easier in some circumstances. Evaluating boolean expressions such as (a==b) does not need a full-length if statement. Instead, we can write one line: “return a==b;”. This reduces our code length when we are writing really long programs. A review list of operators was given with symbols similar to math except for equal to (= =),  not equal to (!=), and (&&), or (||). Other than these exceptions, the rest are the same when comparing two values.

No comments:

Post a Comment