True/False Indicate whether the
statement is true or false.
|
|
|
1.
|
Java is the fastest growing programming language in the world.
|
|
|
2.
|
Java programs cannot be run on different types of computers unless code changes
are made.
|
|
|
3.
|
Compared to C++, Java is more difficult to use and learn, more error prone, and
less portable.
|
|
|
4.
|
A JVM is a program that behaves like a computer.
|
|
|
5.
|
Any computer can run an interpreter.
|
|
|
6.
|
Java applets are inherently insecure.
|
|
|
7.
|
Terminal-oriented programs are similar in structure to programs that process
files of sequentially organized data.
|
|
|
8.
|
Sending messages to objects always takes the form <name
of object>(<parameters>).
|
|
|
9.
|
Java programs cannot be written using a simple text editor, such as
Notepad.
|
|
|
10.
|
When a syntax error is found by the Java compiler, the error message that is
provided yields no information about the type of error that occurred or where it occurred.
|
|
|
11.
|
The main factor affecting a program’s readability is its layout.
|
|
|
12.
|
During the course of a program, a variable’s value cannot change.
|
|
|
13.
|
It is required that variable names begin with a lowercase letter.
|
|
|
14.
|
There is a limit to the number of variables that you can declare in a
program.
|
|
|
15.
|
The default layout manager for frames is an instance of the class BorderLayout.
|
Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
|
16.
|
Java is a modern ____ programming language.
a. | first-generation | c. | procedural | b. | object-oriented | d. | second-generation |
|
|
|
17.
|
Java bears a superficial resemblance to ____, which is currently the
world’s most popular industrial-strength programming language.
|
|
|
18.
|
The Java compiler translates Java into ____.
a. | natural language | c. | byte code | b. | machine language | d. | bit code |
|
|
|
19.
|
A(n) ____ user interface uses the Java console and the command prompt to display
data, prompt the user for data, and read data into a program.
a. | terminal I/O | c. | graphical | b. | text | d. | illustrative |
|
|
|
20.
|
____ is the name of an object that knows how to display or print characters in a
terminal window.
a. | System | c. | System.out | b. | System.terminal | d. | Out.System |
|
|
|
21.
|
The end of a statement in a Java program is denoted by a ____.
|
|
|
22.
|
Which of the following Java statements would print the text “Hello”
in a terminal window?
a. | System.println(“Hello”); | c. | System.printLine(“Hello”); | b. | System.out.println(Hello); | d. | System.out.println(“Hello”); |
|
|
|
23.
|
The file extension for a Java source code file must be ____.
|
|
|
24.
|
The file extension for a byte code file is always ____.
a. | .cla | c. | .java | b. | .class | d. | .jav |
|
|
|
25.
|
Using a simple text editor in Windows to write Java programs, plus running the
Java compiler and the JVM from the command line in Windows is known as the ____ development
environment.
a. | simple | c. | integrated | b. | DOS | d. | Windows |
|
|
|
26.
|
A(n) ____ statement, found at the beginning of a Java source code file, tells
the compiler where to find complete specifications for a class that will be used in the Java source
code.
a. | include | c. | use | b. | export | d. | import |
|
|
|
27.
|
In general, instantiation takes the form ____.
a. | SomeClass someObject = new SomeClass(some
parameters); | b. | SomeClass someObject =
SomeClass(some parameters); | c. | someObject = new
SomeClass(some parameters); | d. | SomeClass = new
SomeClass(some parameters); |
|
|
|
28.
|
The assignment operator is represented in Java by the symbol ____.
|
|
|
29.
|
The multiplication operator is represented in Java by the symbol ____.
|
|
|
30.
|
The code for application windows in Java is located in the class ____.
a. | JApp | c. | JWindow | b. | JFrame | d. | WindowFrame |
|