Java Reference
In-Depth Information
contain the character &). The identifiers RESULT and result are both
valid, but should not be used together in a program because they differ
only by case. The underscore character (as in answer_7 ) is a valid part
of an identifier.
SR 1.25
Although any of the listed names could be used as the required identifier,
the only “good” choice is scoreSum . The identifier x is not descriptive
and is meaningless, the identifier sumOfTheTestScoresOfTheStudents is
unnecessarily long, and the identifier smTstScr is unclear.
SR 1.26
White space is a term that refers to the spaces, tabs, and newline charac-
ters that separate words and symbols in a program. The compiler ignores
extra white space; therefore, it doesn't affect execution. However, it is
crucial to use white space appropriately to make a program readable to
humans.
1.5 Program Development
SR 1.27
At the lowest level, a computer's instructions perform only simple tasks,
such as copying a value or comparing two numbers. However, by put-
ting together millions of these simple instructions every second, a com-
puter can perform complex tasks.
SR 1.28
High-level languages allow a programmer to express a series of program
instructions in English-like terms that are relatively easy to read and use.
However, in order to execute, a program must be expressed in a particu-
lar computer's machine language, which consists of a series of bits that
are basically unreadable by humans. A high-level language program must
be translated into machine language before it can be run.
SR 1.29
Java bytecode is a low-level representation of a Java source code pro-
gram. The Java compiler translates the source code into bytecode, which
can then be executed using the Java interpreter. The bytecode might be
transported across the Web before being executed by a Java interpreter
that is part of a Web browser.
SR 1.30
The word that best matches is
a. machine b. assembly c. high-level d. high-level
e. compiler f. interpreter
SR 1.31
Syntax rules define how the symbols and words of a programming
language can be put together. The semantics of a programming lan-
guage instruction determine what will happen when that instruction is
executed.
SR 1.32
a. Compile-time error b. Run-time error (you cannot divide by
zero) c. Logical error
Search WWH ::




Custom Search