Name:     ID: 
 
Email: 

Alice 2.0 Advanced Quiz 3

True/False
Indicate whether the statement is true or false.
 

 1. 

All syntax errors in a program must be fixed before you can run it.
 

 2. 

You can import all of the classes in a package with a single wild-card import statement.
 

 3. 

The classes in java.lang must be explicitly imported into your program.
 

 4. 

The System.in class does not provide methods for reading numbers.
 

 5. 

The first part of a declaration statement is a valid Java type.
 

 6. 

Escape sequences cannot be used in String literals.
 

 7. 

A method name that is “overloaded” has multiple definitions.
 

 8. 

A test method only needs to contain one test.
 

 9. 

All objects of a class share a class variable.
 

 10. 

A parameter’s scope starts at the beginning of its method, and ends at its method’s closing curly brace.
 

Multiple Choice
Identify the choice that best completes the statement or answers the question.
 

 11. 

____ comments begin with // and end at the end of that line.
a.
Inline
c.
Block
b.
External
d.
C-style
 

 12. 

For every program, Java defines an object named ____ through which textual values (letters, digits, punctuation, and so on) can be displayed on the screen.
a.
System.monitor
c.
System.out
b.
System.scanner
d.
System.in
 

 13. 

Unlike division with real numbers, integer division produces two distinct results: the ____, and the remainder.
a.
divisor
c.
dividend
b.
product
d.
quotient
 

 14. 

To initialize reference type variables, you usually create an object using the ____ operator.
a.
&
c.
+
b.
*
d.
new
 

 15. 

A reference type variable whose value is ____ does not refer to any object.
a.
zero
c.
void
b.
null
d.
the empty String (“”)
 

 16. 

The ____ type is used to store sequences of characters.
a.
Text
c.
Character
b.
String
d.
Byte
 

 17. 

Operator ____ determines the order in which operators with the same priority are performed.
a.
precedence
c.
transitivity
b.
relativity
d.
associativity
 

 18. 

If you wish to pass an argument to a method, that method must contain a(n) ____ to store the argument.
a.
local variable
c.
instance variable
b.
parameter
d.
global variable
 

 19. 

What Alice calls a method is called a(n) ____ method in Java.
a.
value returning
c.
void
b.
empty
d.
null
 

 20. 

____ provide a way to make a computation reusable.
a.
Methods
c.
Constants
b.
Variables
d.
Comments
 

 21. 

A method ____ is a class that stores a group of related methods.
a.
folder
c.
container
b.
package
d.
library
 

 22. 

Object-based and object-oriented programming are, by definition, programming with ____.
a.
functions
c.
objects
b.
methods
d.
procedures
 

 23. 

To send messages to objects, you must learn how to define ____ methods.
a.
static
c.
private
b.
instance
d.
class
 

 24. 

Identifiers declared within a(n) ____ can be accessed anywhere within the class, without generating an error.
a.
parameter list
c.
method’s body
b.
class
d.
constructor
 

 25. 

When you declare a class, a variable, a constant, or a method, you are telling the Java compiler that word’s ____ in the program.
a.
position
c.
meaning
b.
status
d.
path
 



 
         Start Over