Deck 2: First Java Programs

Full screen (f)
exit full mode
Question
UNIX is available on any Macintosh computer that runs MacOS X.
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of the following is NOT true about Java?

A) Java is an object-based language.
B) Java creates programs that are portable.
C) The Java compiler translates into machine language.
D) Java supports threads.
Question
Java programs accomplish many tasks by sending messages to objects.
Question
The main factor affecting a program's readability is misspelled words.
Question
GUI is the machine language for an imaginary Java computer. ____________________
Question
The terminal I/O user interface is familiar to all PC users. ____________________
Question
To run Java byte code, you must install a(n) ____.

A) GUI
B) JIT
C) IDE
D) JVM
Question
A(n) ____ is a process that can run concurrently with other processes.

A) applet
B) thread
C) interpreter
D) parameter
Question
Parameters are used to share information between objects. ____________________
Question
The main advantage of a compiler is that any computer can run it. ____________________
Question
Syntax errors is another term for compile-time errors. ____________________
Question
Graphics and GUI programs in Java can run either as stand-alone applications or as applets.
Question
Java applets have little risk of infecting your computer with a virus.
Question
Source code is the bulk of the instructions of a program.
Question
Java is all of the following EXCEPT ____.

A) fast
B) secure
C) robust
D) portable
Question
In Java, as in algebra, addition and subtraction have a higher precedence than multiplication and division .
Question
Java is ideally suited to developing distributed, network-based applications.
Question
A(n) ____ is a program that behaves like a computer.

A) interpreter
B) compiler
C) terminal I/O
D) applet
Question
A DOS development environment combines an editor, Java compiler, debugger, and a JVM.
Question
Java bears a superficial resemblance to C++.
Question
____ is an editor available with Microsoft Windows.

A) Linux
B) UNIX
C) BlueJ
D) Notepad
Question
A(n) ____________________ is a programmer who breaks into computer systems in an unauthorized way.
Question
____________________ is the fastest growing programming language in the world.
Question
In the ____________________ layout, the default layout manager for frames, you can arrange up to five objects.
Question
A ____ is used to mark the end of each statement in a program.

A) comma (,)
B) slash (/)
C) period (.)
D) semicolon (;)
Question
Colors in most computer systems use the ____ scheme.

A) color class
B) RGB
C) CMYK
D) GUI
Question
FIGURE 2-1 <strong>FIGURE 2-1   Figure 2-1 above represents a(n) ____ user interface.</strong> A) GUI B) JVM C) terminal I/O D) variable <div style=padding-top: 35px>
Figure 2-1 above represents a(n) ____ user interface.

A) GUI
B) JVM
C) terminal I/O
D) variable
Question
Lucia decides to use the ____ development environment so that she can increase her productivity.

A) JGrasp
B) Notepad
C) DOS
D) UNIX
Question
A(n) ____ is a small Java program that runs on Web pages.

A) JIT
B) parameter
C) JVM
D) applet
Question
FIGURE 2-2 <strong>FIGURE 2-2   Figure 2-2 above represents a(n) ____ user interface.</strong> A) GUI B) JVM C) terminal I/O D) variable <div style=padding-top: 35px>
Figure 2-2 above represents a(n) ____ user interface.

A) GUI
B) JVM
C) terminal I/O
D) variable
Question
The three steps to writing and running a program, in order, are ____.

A) enter, edit, compile
B) edit, execute, compile
C) edit, compile, execute
D) enter, interpret, compile
Question
A(n) ____ has a container or pane that can be filled with other objects.

A) JFrame
B) panel
C) window
D) IDE
Question
The main factor affecting a program's readability is its ____.

A) layout
B) spelling
C) language
D) development environment
Question
SomeClass someObject = new SomeClass (some parameters); is an example of ____.

A) assignment
B) instantiation
C) byte code
D) interpretation
Question
All of the following are benefits of using a terminal I/O interface EXCEPT ____.

A) In Java, it is easier to implement than GUI.
B) It is more common and familiar.
C) Some programming situations require a terminal I/O interface.
D) Terminal-oriented programs are similar to programs that process files of sequentially organized data.
Question
____ is an assignment operator.

A) +
B) *
C) =
D) All of the above.
Question
Some JVMs translate byte code instructions into machine language when they are first encountered, using the ____ technique.

A) IDE
B) JIT
C) variable
D) interpreter
Question
All of the following are examples of integrated development environments, EXCEPT ____.

A) BlueJ
B) Eclipse
C) JFrame
D) JGrasp
Question
The string of characters that appears between the parentheses following the message in Java code is called a(n) ____.

A) parameter
B) statement
C) variable
D) thread
Question
A comical animated character on a Web page is likely run using a program called a(n) ____________________.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
Eclipse is an example.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
Familiar interface for PC users.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
An example could be a continuous stream of stock quotes.
Question
In the ____________________ layout, objects are arranged in rows and columns.
Question
List at least three reasons why Java is used by companies such as Sun and IBM to develop their major applications. Why might a programmer choose another language?
Question
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
To run this, you must install a JVM on the computer.
Question
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
Windows are often organized into many of these.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/47
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: First Java Programs
1
UNIX is available on any Macintosh computer that runs MacOS X.
True
2
Which of the following is NOT true about Java?

A) Java is an object-based language.
B) Java creates programs that are portable.
C) The Java compiler translates into machine language.
D) Java supports threads.
C
3
Java programs accomplish many tasks by sending messages to objects.
True
4
The main factor affecting a program's readability is misspelled words.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
5
GUI is the machine language for an imaginary Java computer. ____________________
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
6
The terminal I/O user interface is familiar to all PC users. ____________________
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
7
To run Java byte code, you must install a(n) ____.

A) GUI
B) JIT
C) IDE
D) JVM
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
8
A(n) ____ is a process that can run concurrently with other processes.

A) applet
B) thread
C) interpreter
D) parameter
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
9
Parameters are used to share information between objects. ____________________
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
10
The main advantage of a compiler is that any computer can run it. ____________________
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
11
Syntax errors is another term for compile-time errors. ____________________
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
12
Graphics and GUI programs in Java can run either as stand-alone applications or as applets.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
13
Java applets have little risk of infecting your computer with a virus.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
14
Source code is the bulk of the instructions of a program.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
15
Java is all of the following EXCEPT ____.

A) fast
B) secure
C) robust
D) portable
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
16
In Java, as in algebra, addition and subtraction have a higher precedence than multiplication and division .
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
17
Java is ideally suited to developing distributed, network-based applications.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
18
A(n) ____ is a program that behaves like a computer.

A) interpreter
B) compiler
C) terminal I/O
D) applet
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
19
A DOS development environment combines an editor, Java compiler, debugger, and a JVM.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
20
Java bears a superficial resemblance to C++.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
21
____ is an editor available with Microsoft Windows.

A) Linux
B) UNIX
C) BlueJ
D) Notepad
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
22
A(n) ____________________ is a programmer who breaks into computer systems in an unauthorized way.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
23
____________________ is the fastest growing programming language in the world.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
24
In the ____________________ layout, the default layout manager for frames, you can arrange up to five objects.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
25
A ____ is used to mark the end of each statement in a program.

A) comma (,)
B) slash (/)
C) period (.)
D) semicolon (;)
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
26
Colors in most computer systems use the ____ scheme.

A) color class
B) RGB
C) CMYK
D) GUI
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
27
FIGURE 2-1 <strong>FIGURE 2-1   Figure 2-1 above represents a(n) ____ user interface.</strong> A) GUI B) JVM C) terminal I/O D) variable
Figure 2-1 above represents a(n) ____ user interface.

A) GUI
B) JVM
C) terminal I/O
D) variable
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
28
Lucia decides to use the ____ development environment so that she can increase her productivity.

A) JGrasp
B) Notepad
C) DOS
D) UNIX
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
29
A(n) ____ is a small Java program that runs on Web pages.

A) JIT
B) parameter
C) JVM
D) applet
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
30
FIGURE 2-2 <strong>FIGURE 2-2   Figure 2-2 above represents a(n) ____ user interface.</strong> A) GUI B) JVM C) terminal I/O D) variable
Figure 2-2 above represents a(n) ____ user interface.

A) GUI
B) JVM
C) terminal I/O
D) variable
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
31
The three steps to writing and running a program, in order, are ____.

A) enter, edit, compile
B) edit, execute, compile
C) edit, compile, execute
D) enter, interpret, compile
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
32
A(n) ____ has a container or pane that can be filled with other objects.

A) JFrame
B) panel
C) window
D) IDE
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
33
The main factor affecting a program's readability is its ____.

A) layout
B) spelling
C) language
D) development environment
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
34
SomeClass someObject = new SomeClass (some parameters); is an example of ____.

A) assignment
B) instantiation
C) byte code
D) interpretation
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
35
All of the following are benefits of using a terminal I/O interface EXCEPT ____.

A) In Java, it is easier to implement than GUI.
B) It is more common and familiar.
C) Some programming situations require a terminal I/O interface.
D) Terminal-oriented programs are similar to programs that process files of sequentially organized data.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
36
____ is an assignment operator.

A) +
B) *
C) =
D) All of the above.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
37
Some JVMs translate byte code instructions into machine language when they are first encountered, using the ____ technique.

A) IDE
B) JIT
C) variable
D) interpreter
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
38
All of the following are examples of integrated development environments, EXCEPT ____.

A) BlueJ
B) Eclipse
C) JFrame
D) JGrasp
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
39
The string of characters that appears between the parentheses following the message in Java code is called a(n) ____.

A) parameter
B) statement
C) variable
D) thread
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
40
A comical animated character on a Web page is likely run using a program called a(n) ____________________.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
41
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
Eclipse is an example.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
42
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
Familiar interface for PC users.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
43
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
An example could be a continuous stream of stock quotes.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
44
In the ____________________ layout, objects are arranged in rows and columns.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
45
List at least three reasons why Java is used by companies such as Sun and IBM to develop their major applications. Why might a programmer choose another language?
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
46
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
To run this, you must install a JVM on the computer.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
47
Identify the letter of the choice that best matches the phrase or definition.
a.Applet
b.GUI
c.IDE
d.Pane
e.Byte code
Windows are often organized into many of these.
Unlock Deck
Unlock for access to all 47 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 47 flashcards in this deck.