Quiz 1
Which of the following is not true of using an IDE to develop Java programs? a. It's harder to detect syntax errors. b. It's harder to make mistakes when entering code. c. It's easier to develop graphical user interfaces. d. It's easier to debug your programs.
a. It's harder to detect syntax errors.
Which of the following is true? a. Java programs can run on different platforms, like Windows and Unix, without being recompiled. b. C++ programs have always run more slowly than Java programs. c. In contrast to Java, C# requires programmers to manage almost all memory operations. d. All of the above.
a. Java programs can run on different platforms, like Windows and Unix, without being recompiled.
What kind of Java program runs within a Java-enabled browser? a. an applet b. a network program c. an application d. a servlet
a. an applet
When NetBeans detects a statement that has a syntax error, what does it do? a. it places a red wavy line under the statement b. it ignores the syntax error until runtime c. none of the above d. it displays the error message in the Output window
a. it places a red wavy line under the statement
The extension for a Java source file is a. java b. class c. jav d. txt
a. java
In NetBeans, the class that contains the main method for an application is known as the a. main class b. project class c. master class d. library class
a. main class
The NetBeans IDE stores all of the files for an application in a a. project b. class c. package d. library
a. project
Which of the following isn't a benefit of a typical IDE for Java? a. The syntax of your code is checked as you enter it. b. Your code compiles and runs faster. c. The debugging features make it easier for you to find bugs in your applications. d. The IDE helps you complete code as you type.
b. Your code compiles and runs faster.
Bytecodes are a. ready to be executed by a Windows system b. input to the Java interpreter c. output from the Java interpreter d. input to the Java compiler
b. input to the Java interpreter
What window does NetBeans use to get input from a console application? a. the Console window b. the Output window c. the Projects window d. the Input window
b. the Output window
To achieve platform independence, the Java virtual machine a. interprets the virtual code b. interprets the source code c. interprets the bytecodes d. interprets the machine code
c. interprets the bytecodes
To create a Java source file, you use a a. compiler b. virtual machine c. text editor d. interpreter
c. text editor
A syntax error occurs when a. bytecodes can't be interpreted properly b. the Java compiler can't be located c. there's a syntax error in a Java statement d. the class doesn't contain a main method
c. there's a syntax error in a Java statement
As you develop a Java program, you can use NetBeans to a. enter and edit the source code b. compile the source code c. run the application d. all of the above
d. all of the above
In NetBeans, what tool do you use to enter and edit source code? a. debugger b. compiler c. GUI builder d. code editor
d. code editor
Since NetBeans does this automatically, you typically don't need to a. delete a project b. debug a project c. run a project d. compile/build a project
d. compile/build a project
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 automatic compilation feature b. the bytecode integration feature c. the syntax detection feature d. the code completion feature
d. the code completion feature
