MR.T
MANCHESTER
BLUE
CHAMPIONS
ELITE
100

Object-oriented programmers use the term ____ when a child class contains a field or method that has the same name as one in the parent class.


a.

out of scope

b.

ambiguous


c.

override

d.

parent friendly

c. OVERRIDE

100

The ____ statement notifies the program that you will be using the data and method names that are part of the imported class or package.


a.

use

b.

package


c.

class

d.

import

D. IMPORT

100

11. ____ are local classes that have no identifier.


a.

Anonymous classes

b.

Nonstatic member classes


c.

Local classes

d.

static member classes

A. ANONYMOUS

100

The methods of LocalDate include getMonth() and getDayOfWeek(). Each of these methods returns a(n) ____, which is a data type that consists of a list of values.


a.

array

b.

constant


c.

shadow array

d.

enumeration

D. Enumeration
100

Within any class or method, the code between a pair of curly braces is called a(n) ____.


a.

overload

b.

argument


c.

scope

d.

block

D. Block

200

. A variable comes into existence, or ____, when you declare it.


a.

goes out of scope

b.

comes into scope


c.

overrides scope

d.

is referenced

COMES INTO SCOPE

200

. A method can receive ____ arguments, even if it is defined as needing double arguments.


a.

string

b.

integer


c.

constructor

d.

send

B. INTEGER

200

A locally declared variable always ____ another variable with the same name elsewhere in the class.


a.

creates

b.

masks


c.

deletes

d.

uses

B. MASKS

HATE THAT WORD

200

When you ____methods, you risk creating an ambiguous situation—one in which the compiler cannot determine which method to use.


a.

use static variables in

b.

use class variables in


c.

finalize

d.

overload

D. overload
200

____ involves using one term to indicate diverse meanings, or writing multiple methods with the same name but with different parameter lists.


a.

Referencing

b.

Overloading


c.

Nesting

d.

Signing

B. Overloading

300

. A Java variable’s scope level is its ____.


a.

constructor

b.

class method


c.

block

d.

fundamental class

C. BLOCK

300

You can use ____ arguments to initialize field values, but you can also use arguments for any other purpose.


a.

object

b.

constructor


c.

data

d.

field

B CONSTRUCTOR

300

If you want all objects to share a single nonchanging value, then the field is static and ______.


a.

end

b.

final


c.

permanent

d.

class

B. FINAL

300

If a class’s only constructor requires an argument, you must provide an argument for every ____ of the class that you create.


a.

parameter

b.

type


c.

object

d.

method

C. Object
300

When you instantiate an object from a class, ____ is reserved for each instance field in the class.


a.

a constructor

b.

a signature


c.

memory

d.

a field name

C. Memory
400

When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.


a.

parameter

b.

scope


c.

output

d.

constructor

A PARAMETER

400

When you pass a(n) ____, you pass a memory address.


a.

reference

b.

class variable


c.

value

d.

static variable

A. REFERENCE

400

When an object of one class is a data field within another class, they are related by ____.


a.

extension

b.

scope


c.

composition

d.

is-a

C. Composition

400

. Another name for a nonstatic member class is a(n) ____.


a.

static member class

b.

inner class


c.

local class

d.

anonymous class

B inner class

400

A(n) ____ block begins immediately after the method declaration and ends at the end of the method.


a.

inner

b.

outer


c.

nested

d.

overlapped

B. Outer
500

When calling this() from a constructor, it must be the ____ statement within the constructor.


a.

first

b.

ending


c.

second

d.

indented

A FIRST

500

. When they have the same name, variables within ____ of a class override the class’s fields.


a.

packages

b.

statements


c.

fields

d.

methods

D. METHODS

500

It is not necessary to create an instance of the Math class because the constants and methods of the class are ____.


a.

void

b.

final


c.

static

d.

public

C. Static

500

When you properly ____ a method, you can call it providing different argument lists, and the appropriate version of the method executes.


a.

declare

b.

overload


c.

name

d.

delete

B. Overload
500

25. ____ variables are variables that are shared by every instantiation of a class.


a.

Integer

b.

Instance


c.

Class

d.

Time

C. Class