Objects-First with Java: A Practical Introduction using BlueJ, 6th Edition
2. Understanding class definitions9 Documented Misconceptions
Check YourselfComparisonWithBooleanLiteral
To test whether an expression is true or false, one must compare it to true or to false
ConditionalIsSequence
If-else is equivalent to sequence of two ifs
ConstructorAllocates
The constructor allocates the object
ConstructorReturnsObject
Constructors need to return objects
DeferredReturn
A return statement in the middle of a method doesn't return immediately
IfIsLoop
The body of an if statement executes repeatedly, as long as the condition holds
OutsideInMethodNesting
Nested method calls are invoked outside in
ReturnCall
Return statements need () around the return value
StringLiteralNoObject
One needs to call the String constructor to get a String object from a literal