Sprechen Sie Java: Eine Einführung in das systematische Programmieren, 4. Auflage
2. Einfache Programme21 Documented Misconceptions
Check YourselfAssignmentNotExpression
An assignment a=b is not an expressionCharNotNumeric
Char is not a numeric typeCompositeExpressionsUntyped
Expressions that consist of multiple parts have no typeAssignCompares
= compares two valuesEvaluationResultsArePrinted
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 initializedNoCharEscape
\ is a normal character in char and String literalsNoAtomicExpression
Expressions must consist of more than one pieceNoLongLiterals
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 don't need to be declaredUntypedVariables
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