


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























String boolean char int double
Best Practice : do not use == or != with Strings, but rather the equals method; details later.
String boolean char int double
Operators for or (||) and and (&&) use short- circuit evaluation.
String boolean char int double
Best Practice : do not check double s for equality; details later.
n == 0 new SimpleWriter1L()
What is the type of each of these expressions?
n == 0 new SimpleWriter1L()
This fragment creates a new object of type SimpleWriter1L, and its value is a reference to that object; details later.
This is the same as j = j + 7;
The scope of variable s is just the block in which it is declared.
We will normally use these, but you may use a switch statement if you like; details later.