Sprechen Sie Java: Eine Einführung in das systematische Programmieren, 4. Auflage
2. Einfache Programme21 Documented Misconceptions
Check YourselfAssignCompares
= compares two valuesAssignmentNotExpression
An assignment a=b is not an expressionCompositeExpressionsUntyped
Expressions that consist of multiple parts have no typeCharNotNumeric
Char is not a numeric typeEvaluationResultsArePrinted
Evaluating an expression means outputting its resultExpressionsDynamicallyTyped
One has to evaluate an expression to determine its typeLargeIntegerLong
Large integer numbers have type longLiteralNoExpression
A literal is not an expressionLiteralString
When passing a literal string as argument to a method, no quotes are neededLocalVariablesAutoInitialized
Local variables are automatically initializedNoAtomicExpression
Expressions must consist of more than one pieceNoCharEscape
\ is a normal character in char and String literalsNoLongLiterals
There are no long literalsNoReservedWords
Every sequence of letters and digits starting with a letter can be used as an identifierSingleQuoteString
String literals can be in single quotesStringLiteralNoObject
One needs to call the String constructor to get a String object from a literalTargetTyping
The type of a numerical expression depends on the type expected by the surrounding contextUndeclaredVariables
Variables can be used even without being declared beforehandUntypedVariables
Variable declarations don't need a typeVariablesHoldExpressions
= stores an expression in a variableZeroDigitsCompress
In integer numbers, decimal digits with value `0` take less storage than decimal digits with other values