Quiz 1 (Midterm) Flashcards
Any class can contain an unlimited number of methods.
-True
-False
T
An application’s main() method must have a void return type.
-True
-False
T
A method’s identifier must be more than one word, must have embedded spaces, and can be a Java keyword.
-True
-False
F
Parentheses in a method declaration contain parameters that are “dropped into” the method.
-True
-False
T
When a value is returned from a method, you are required to use the value when the method is called.
-True
-False
F
You can overload methods correctly by providing different parameter lists for methods with the same name.
-True
-False
T
A block can exist entirely within another block or entirely outside and separate from another block, and sometimes blocks can overlap.
-True
-False
F
Any string value that is input into a program can be used in arithmetic operations.
-True
-False
F
When using the prewritten equals() method, a true or false comparison between two Strings is returned, but you do not know how the code looks behind the scenes.
-True
-False
T
The terms “literal string” and “string literal” are entirely different in Java programming.
-True
-False
F
Assigning ____ to a field means that no other classes can access the field’s values.
-private access
-user rights
-key access
-protected access
private access
Methods used with object instantiations are called ____ methods.
-internal
-instance
-static
-accessor
instance
Methods that retrieve values are called ____ methods.
-static
-accessor
-class
-mutator
accessor
After an object has been instantiated, its methods can be accessed using the object’s _____, a dot, and a method call.
-operator
-identifier
-class
-output
identifier
When an application is run, the method that must be executed first must be named ____.
-main()
-void()
-first()
-final()
main()