1/20
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
The "building blocks" that Java programmers use to write computer programs are called _______.
A. windows
B. objects
C. internal data
D. entities
objects
In Java, objects within the same class share common ___________ ?
A. behavior
B. data
C. instructions
D. comments
behavior
What is a storage location in the computer's memory called that has a type, name, and contents?
A. identifier
B. literal
C. label
D. variable
variable
The camel case naming convention uses _________ at intervals in the middle of the variable name.
A. uppercase letters
B. digits
C. dollar signs
D. the underscore character
uppercase letters
By convention among Java programmers, variables begin with a(n) _____________.
A. uppercase letter
B. digit
C. lowercase letter
D. dollar sign
lowercase letter
By convention among Java programmers, class names begin with a(n) _____________.
A. lowercase letter
B. dollar sign
C. digit
D. uppercase letter
uppercase letter
What is the name of the type that denotes floating-point numbers that can have fractional parts?
A. double
B. floatingPoint
C. int
D. integer
double
What is the name of the type that denotes whole numbers?
A. double
B. int
C. whole
D. integer
int
In Java, a comment on a line begins with which characters?
A. ''
B. //
C. ()
D. " "
//
What term is used to refer to text in a program that is an explanation for human readers of the code?
A. methods
B. comments
C. constants
D. [ and ]
comments
What is the purpose of the assignment operator?
A. to check for inequality
B. to check for identity
C. to check for equality
D. to change the value of a variable
to change the value of a variable
The type of an object is given by its ______ ?
A. variable
B. method
C. reference
D. class
class
Which is not a method of the String class?
A. length
B. toUpperCase
C. toLowerCase
D. println
println
Input to a method, enclosed in parentheses after the method name, is known as ______________.
A. implicit parameters
B. interfaces
C. arguments
D. return values
arguments
The value calculated by a method is called its _____ value.
A. implicit
B. explicit
C. argument
D. return
return
Which operator constructs object instances?
A. new
B. instanceof
C. void
D. construct
new
What terminology describes a method that returns information about an object and does not change the object's internal data?
A. mutator
B. accessor
C. void
D. public
accessor
What terminology describes a method of an object that modifies that object's internal data?
A. public
B. void
C. mutator
D. accessor
mutator
What do object variables store?
A. objects
B. classes
C. object references
D. numbers
object references
What is the purpose of a test program?
A. The test program confirms that the Java compiler is correct.
B. The test program verifies that methods have been implemented correctly.
C. The test program checks the syntax of each object's methods.
D. The test program enforces that the types between arguments match correctly.
The test program verifies that methods have been implemented correctly.
Assume the class Circle has an accessor called getRadius and a mutator called setRadius. What is the output of the following code?
Circle c1 = new Circle(3);
Circle c2 = c1;
c1.setRadius(4);
System.out.println(c2.getRadius());
A. 4
B. 3
C. 6
D. 8
4