Which package is automatically imported in any Java program?
Front
java.lang
Back
Which of the following is a valid constructor header for the Player class that accepts the player name as a parameter?
Front
public Player(String playername)
Back
The public constructors and methods of a class form the public ____ of the class.
Front
interface
Back
Which of the following statements about methods is correct?
Front
A method is a sequence of instructions that could access the data of an object
Back
Which of the following declares a variable that will store a measurement with fractional parts?
Front
double measure;
Back
In Java, every statement must end with which symbol?
Front
;
Back
The "building blocks" that Java programmers use to write computer programs are called
Front
objects
Back
What is a storage location in the computers memory called that has a type, name, and contents?
Front
variable
Back
Which statement about identifiers is correct?
Front
Identifiers can be made up of letters, digits, and the underscore character
Back
What term is used to refer to an individual instruction inside a method?
Front
statement
Back
Which special delimeter is used with the javadoc utility to document method arguments?
Front
@param
Back
Assume the Java statement :
Circle c1 = new Circle(3);
What does the variable c1 sotre?
Front
A reference to the memory location of the constructed Circle object.
Back
What contains sequences of programming instructions that describe how to perform a particular task?
Front
method
Back
When was Java officially introduced?
Front
1995
Back
By convention among Java programmers, variables begin with what?
Front
lowercase letter
Back
Which of the following statements about test programs is true?
Front
Test programs verify that methods have been implemented correctly. A test program calls methods and checks that they return the expected results.
Back
What tool translates high-level instructions into low level machine code?
Front
compiler
Back
No matter which Java development environment you use, what happens to the Java source code in order for a Java program to execute?
Front
A Java compiler translates the source code into class files
Back
Consider the following method comment and method header:
Converts from a source measurement to a target measurement.
@param _____ the measurement
@return the input value converted to the target unit
public double convertTo(double fromMeasurement){..}
Fill in the blank
Front
fromMeasurement
Back
Why is it a good idea for a programmer to write comments about a method first, before implementing it?
Front
it is an excellent test to ensure that the programmer firmly understands what is needed
Back
We want to change the BankAccount class so that all accounts will have a monthly fee. Which of the following will properly define the instance variable monthlyFee that holds the monthly fee?
Front
private double monthlyFee;
Back
By convention among Java programmers, class names begin with what?
Front
uppercase letter
Back
Input to a method, enclosed in parentheses after the method name, is known as what?
Front
arguments
Back
Which of the following corresponds to a valid constructor header for the Player class?
Front
public Player()
Back
To use a class in another package you need to what?
Front
import it
Back
What is the Java Virtual Machine?
Front
A program that simulates a real CPU running compiled Java code.
Back
What is a collection of classes with a related purpose?
Front
package
Back
We want to change the BankAccount class so that all accounts will have a monthly fee. The instance variable monthlyFee will hold the monthly fee. Which of the following is the correct public interface for a constructor that sets both the initial balance and monthly fee?
Front
public BankAccount(double initialBalance, double monthlyFee)
Back
What is the name of the constructor for the BankAccount class?
Front
BankAccount
Back
The javadoc utility is used to what?
Front
automatically generate HTML pages that describe classes
Back
What is the purpose of the assignment operator?
Front
to change the value of a variable
Back
Every Java program consists of one or more of these fundamental building blocks.
Front
class
Back
What is the name of the type that denotes whole numbers?
Front
int
Back
What does API stand for?
Front
Application Programming Interface
Back
What term is used to refer to languages that allow programmers to describe tasks at a higher conceptual level than machine code?
Front
high-level
Back
Which of the following terms denotes the memory location of an object?
Front
object reference
Back
What is the name of the file that contains the Java source code for the public class?
Front
HelloPrinter.java
Back
Which import allows for the use of the rectangle class?
Front
import java.awt.Rectangle;
Back
Assuming the following Java statement:
int num = 10;
What does the variable num store?