Chapter 3

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Methods that retrieve values are called ____ methods.

accessor

The arguments in a method call are often referred to as ____.

actual parameters

When an application is run, the method that must be executed first must be named ____.

main ( )

Method that sets or changes field values

mutator method

A unique identifier is most likely used as a ____ key in a database.

primary

A method's identifier must be more than one word, must have embedded spaces, and can be a Java keyword.

False

The interface is the part of a method that the method's client does not see.

False

When a value is returned from a method, you are required to use the value when the method is called.

False

____ parameters are variables in a method declaration that accept the values from the actual parameters.

Formal

____ is a principle of object-oriented programming that describes the encapsulation of method details within a class.

Implementation hiding

An application's main() method must have a void return type.

True

Any class can contain an unlimited number of methods.

True

Application classes frequently instantiate objects that use the objects of other classes.

True

Parentheses in a method declaration contain parameters that are "dropped into" the method.

True

You can identify a class that is an application because it contains a public static void main() method.

True

You can write your own constructor methods; but when you don't write a constructor method for a class object, Java writes one for you.

True

Method that retrieves a value

accessor method

Classes that can be used as the basis for any other class

extended

Method names that begin with ____ and set are very typical.

get

Assigning ____ to a field means that no other classes can access the field's values.

private access

Normally, you declare constructors to be ____so that other classes can instantiate objects that belong to the class.

public

Used to return a value back to the calling method

return statement

Which of the following is NOT an initial value assigned to an object's data field by a default constructor?

Boolean fields set to true

Are called class methods

static method

An empty method is called a ____.

stub

A method body provides information about how other methods can interact with it.

False

A(n) ____ is a type whose implementation is hidden and accessed through its public methods.

abstract data type

The arguments in a method call are often referred to as ____ . The variables in the method declaration that accept the values from the actual parameters are ____.

actual parameters, formal parameters

For ease in locating class methods, many programmers store them in ____ order.

alphabetical

An application or a class that instantiates objects of another prewritten class

class user

A(n) ____ method is a method that creates and initializes class objects.

constructor

Often, programmers list the ____ first because it is the first method used when an object is created.

constructor

The name of the ____ is always the same as the name of the class whose objects it constructs.

constructor

Variables you declare within a class, but outside of any method

data fields

Unreachable statements that can never execute

dead code

A method header is also called a(n) _____.

declaration

A(n) ____ constructor is one that requires no arguments.

default

Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other class.

extended

After an object has been instantiated, its methods can be accessed using the object's _____, a dot, and a method call.

identifier

To execute a method, you ____ it from another method.

invoke

A(n) ____ variable is known only within the boundaries of the method.

local

The ____ method executes first in an application, regardless of where you physically place it within its class.

main ( )

Every object is a _____ of a more general class.

member

A(n) ____ is a program module that contains a series of statements that carry out a task.

method

The combination of the method name and the number, types, and order of arguments

method's signature

Access specifiers are sometimes called access____.

modifiers

In order to allocate the needed memory for an object, you must use the ____ operator.

new

Allocates memory for an object

new operator

Included within the method declaration parentheses

parameter type

The first line of a method

header

Hidden implementation methods are often referred to as existing in a(n) ____.

black box

Data items you use in a call to a method are called ____.

arguments

Variables in the method declaration that accept the values from the actual parameters

formal parameters

A(n) ____ includes the class name, a dot, and the method name.

fully qualified identifier

When a variable ceases to exist at the end of a method, programmers say the variable ____.

goes out of scope

Encapsulating method details in a class

implementation hiding

Methods used with object instantiations are called ____ methods.

instance

Data components of a class

instance variables

A(n) ____ causes a value to be sent from a called method back to the calling method.

return statement

A(n) ____ describes the type of data the method sends back to its calling method.

return type


संबंधित स्टडी सेट्स

Progress Learning English 2 SLO pretest

View Set

7.1 Heat transfer by Convection and Radiation

View Set

MGMT 164 Final Practice Questions

View Set

Maths - equation - term one half two

View Set

Unit 1: Nonfiction: Doing a Close Reading: Tutorial

View Set

Allusions and Vocabulary AP Lit Quiz 3

View Set

Midterm Exam Review (McGraw Hill)

View Set