Sprechen Sie Java: Eine Einführung in das systematische Programmieren, 4. Auflage
2. Einfache Programme21 Documented Misconceptions
Check YourselfAssignCompares
= compares two values
AssignmentNotExpression
An assignment a=b is not an expression
CompositeExpressionsUntyped
Expressions that consist of multiple parts have no type
CharNotNumeric
Char is not a numeric type
EvaluationResultsArePrinted
Evaluating an expression means outputting its result
ExpressionsDynamicallyTyped
One has to evaluate an expression to determine its type
LargeIntegerLong
Large integer numbers have type long
LiteralNoExpression
A literal is not an expression
LocalVariablesAutoInitialized
Local variables are automatically initialized
LiteralString
When passing a literal string as argument to a method, no quotes are needed
NoAtomicExpression
Expressions must consist of more than one piece
NoCharEscape
\ is a normal character in char and String literals
NoReservedWords
Every sequence of letters and digits starting with a letter can be used as an identifier
NoLongLiterals
There are no long literals
SingleQuoteString
String literals can be in single quotes
StringLiteralNoObject
One needs to call the String constructor to get a String object from a literal
TargetTyping
The type of a numerical expression depends on the type expected by the surrounding context
UndeclaredVariables
Variables can be used even without being declared beforehand
UntypedVariables
Variable declarations don't need a type
VariablesHoldExpressions
= stores an expression in a variable
ZeroDigitsCompress
In integer numbers, decimal digits with value `0` take less storage than decimal digits with other values