Term
An ______ is a finite sequence of steps that solves some well-defined problem |
|
Definition
|
|
Term
_____ is a set of natural language-like statements that describe, at various levels of detail, the steps an algorithm must take to solve a problem and the order in which those steps should be taken. |
|
Definition
|
|
Term
Another term for ______ is information hiding |
|
Definition
|
|
Term
True/False: Polymorphism is a classification system for organizing classes in Java. |
|
Definition
|
|
Term
True/False: In Java, the double equal sign means "make equal to". |
|
Definition
|
|
Term
The term ______ refers to a way of organizing classes that share properties |
|
Definition
|
|
Term
______ means that two or more methods can have different names in the same way that an English word can have two or more meanings. |
|
Definition
|
|
Term
A ______ occurs when a program has a grammatical mistake like missing punctuation. |
|
Definition
|
|
Term
If the computer displays an error message while executing your program, the program contains a(n) __________. |
|
Definition
|
|
Term
In Java, a library of classes is called |
|
Definition
|
|
Term
Single quotes are used with constants of the ____ type. |
|
Definition
|
|
Term
True/False: Use of a type cast from double to int sometimes causes values to be rounded. |
|
Definition
|
|
Term
True/False: ice-cream is an illegal identifier in Java. |
|
Definition
|
|
Term
True/False: A common practice that is used in the textbook is to start the names of variables with a capital letter. |
|
Definition
|
|
Term
Which of the following is a class type? (Int, double, char, string) |
|
Definition
|
|
Term
Which of the following is not an integer type? (double, short, byte, int) |
|
Definition
|
|
Term
Which of the following is a correct statement in Java? (apes = monkeys + gorillas, tigers = 3, lions + tigers = cats;, zebras += 5;) |
|
Definition
|
|
Term
println is a method used with __________ |
|
Definition
|
|
Term
Which of the following assignments would not be allowed without a typecast? (assigning a short value to a long variable, assigning a byte value to a double variable, assigning an int value to a float variable, assigning a double value to a long variable) |
|
Definition
assigning a double value to a long variable |
|
|
Term
Which of the following operators has the highest precedence? (unary +, binary +, %, *) |
|
Definition
|
|
Term
A number like 60 in a program should (be replaced with a variable that has the same value, be replaced with a named constant, be explained by a comment, be written as '60' if used as an integer) |
|
Definition
be replaced with a named constant |
|
|
Term
Words that have predefined meanings in Java and cannot be used as variable names are called |
|
Definition
|
|
Term
A case label is used with a(n)____ statement |
|
Definition
|
|
Term
True/False: A multibranch if-else statement is one kind of nested if-else statement. |
|
Definition
|
|
Term
True/False: The body of any while loop will be executed at least once. |
|
Definition
|
|
Term
True/False: for loops and while loops use the same stopping mechanism. |
|
Definition
|
|
Term
True/False: In ASCII, a capital 'Z' comes before a small 'a'. |
|
Definition
|
|
Term
A(n) __________ goes in the parentheses following the word if in an if-else statement. |
|
Definition
|
|
Term
What is the correct way to end a program’s execution normally? |
|
Definition
|
|
Term
A(n) _____ is an action that an object can take and is specified in the class definition. |
|
Definition
|
|
Term
Compiling a file called Game.java will produce a file called ____ |
|
Definition
|
|
Term
____ is the word used to say that there are no restrictions on the use of a method or data item. |
|
Definition
|
|
Term
The reserved word ____ can be used as a name for the calling object. |
|
Definition
|
|
Term
Names of mutator methods usually begin with ____ |
|
Definition
|
|
Term
To create an object of a class type, the key word ____ is used |
|
Definition
|
|
Term
One kind of method returns a value. The other kind of method is called a(n) _____ |
|
Definition
|
|
Term
A ____ is the definition(or blueprint) of a kind of object. |
|
Definition
|
|
Term
A variable declared inside a method is called a ______ variable |
|
Definition
|
|
Term
True/False: All objects of the same class have the same data values. |
|
Definition
|
|
Term
True/False: When a method call is executed, values from the method definition are substituted for the arguments in the method call. |
|
Definition
|
|
Term
True/False: Parameters of a primitive type are passed to methods using the call-by-value mechanism. |
|
Definition
|
|
Term
True/False: Encapsulation is the process of defining a class that has no public methods. |
|
Definition
|
|
Term
True/False: Private methods are part of the interface of a class. |
|
Definition
|
|
Term
True/False: A variable of class type does not store an object of that class. |
|
Definition
|
|
Term
True/False: An equals method should return a boolean value. |
|
Definition
|
|
Term
True/False: A method can change the value of a variable of a primitive type that is an argument to the method. |
|
Definition
|
|
Term
True/False: A method can change the value of instance variables of an argument that is of a class type. |
|
Definition
|
|
Term
What can you tell about the method surpriseMe in the code below?
int something;
something = surpriseMe(); |
|
Definition
It has no parameters but has a return value. |
|
|
Term
Normally all instance variables are given the qualifier |
|
Definition
|
|
Term
One benefit of encapsulation is |
|
Definition
the implementation can be changed without changing programs that use the class |
|
|
Term
When comparing two objects to see if they have the same contents, one should |
|
Definition
define an equals method in the class and use it |
|
|
Term
A ____ method is a method that can be invoked using the class name instead of an object name. |
|
Definition
|
|
Term
The method used to convert from Character to char is ______ |
|
Definition
|
|
Term
The method used to convert from String to Float is _____ |
|
Definition
|
|
Term
A _____ is a simplified version of a method that is easily verified and is used for testing. |
|
Definition
|
|
Term
A _____ is a special kind of method used to initialize objects. |
|
Definition
|
|
Term
Integer and Double are _____ classes |
|
Definition
|
|
Term
A constructor with no parameters is called a _____ constructor |
|
Definition
|
|
Term
What will happen if a program uses an array index that is out of bounds? |
|
Definition
The program will compile but Java will give an error message when the program runs. |
|
|
Term
Which statement best describes an array of 10 elements where the elements are of class String? |
|
Definition
The array will be created with the elements equal to null. |
|
|
Term
The highest index that can be used with an array |
|
Definition
is the number of elements in the array minus one |
|
|
Term
The lowest index that can be used with an array |
|
Definition
|
|
Term
True/False: Arrays in Java are objects |
|
Definition
|
|
Term
True/False: The first element in an array is accessed using zero as an index. |
|
Definition
|
|
Term
True/False: You can change the size of an array by assigning a new value to the length instance variable. |
|
Definition
|
|
Term
True/False: The size of an array in Java is determined when the program is compiled. |
|
Definition
|
|
Term
True/False: In a two-dimensional array, all of the rows must have the same number of elements. |
|
Definition
|
|
Term
True/False: An accessor method that returns an array should return a copy of an instance variable array rather than the instance variable itself. |
|
Definition
|
|
Term
True/False: If one element from an array is passed as a parameter to a method, then the called method can modify any element in the array. |
|
Definition
|
|
Term
True/False: All data stored in an array must be the same type. |
|
Definition
|
|
Term
True/False: Constructors have return type void. |
|
Definition
|
|
Term
True/False: It is possible to have two methods in the same class that have the same name, the same number and types of arguments, but different return types. |
|
Definition
|
|
Term
True/False: If you add at least one constructor to a class, no constructors will be automatically created for the class. |
|
Definition
|
|
Term
The main job of the constructor method is to: |
|
Definition
Initialize the object's instance variables |
|
|