Java Programming I Flashcards

1
Q

To achieve platform independence, the Java virtual machine

A

interprets the bytecodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In NetBeans, what tool do you use to enter and edit source code?

A

code editor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

As you develop a Java program, you can use NetBeans to

A

all of the above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following isn’t a benefit of a typical IDE for Java?

A

Your code compiles and runs faster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Bytecodes are

A

input to the Java interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

To create a Java source file, you use a

A

text editor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What window does NetBeans use to get input from a console application?

A

the Output window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Since NetBeans does this automatically, you typically don’t need to

A

compile/build a project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In NetBeans, the class that contains the main method for an application is known as the

A

main class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

One of the many things that differentiate Java from C, C++, and C# is . . .

A

The use of garbage collection so that the programmer does not have to manage memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The NetBeans IDE stores all of the files for an application in a

A

project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When you have two or more projects open in NetBeans, you can make it easier to run one project by setting it as the

A

main project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What kind of Java program runs within a Java-enabled browser?

A

an applet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What NetBeans feature can help you enter a method by displaying a list of methods that are available from an object or class?

A

the code completion feature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A syntax error occurs when

A

there’s a syntax error in a Java statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of the following is not true of using a IDE to develop Java programs?

A

It’s harder to detect syntax errors.

17
Q

The extension for a Java source file is

A

java

18
Q

When NetBeans detects a statement that has a syntax error, what does it do?

A

it places a red wavy line under the statement

19
Q

What dialog box do you use to set the Java version for a project?

A

the Project Properties dialog box

20
Q

Which of the following is true?

A

Java programs can run on different platforms, like Windows and Unix, without being recompiled.