CH 3+4 Java

Ace your homework & exams now with Quizwiz!

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

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

Class

____ 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

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

Overloading

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

actual parameters

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

alphabetical

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

block

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

comes into scope

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

composition

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

constructor

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

constructor

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

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

final

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

get

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

goes out of scope

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

identifier

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

import

Methods used with object instantiations are called ____ methods.

instance

The ____ package contains is implicitly imported into Java programs and is the only automatically imported, named package.

java.lang

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

main

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

main()

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

masks

Every object is a _____ of a more general class.

member

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

memory

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

method

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

methods

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

new

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

object

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

overload

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.

override

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

parameter

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

return statement

The compiler determines which version of a method to call by the method's ____.

signature

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

static

It is a convenience to be able to use one reasonable name for ____ that are functionally identical except for argument types.

tasks

The reference to an object that is passed to any object's nonstatic class method is called the ____.

this reference

You can use the asterisk (*) as a ____, which indicates that it can be replaced by any set of characters.

wildcard symbol


Related study sets

Ch 14 Adolescent Biosocial development concepts

View Set

Biostatistics Multiple Choice Questions

View Set

Positioning, the five basic body positions

View Set

Chapter 11; Fundamentals of the Nervous System and Nervous Tissue

View Set

Biology 2 Lecture Connect HW - Ch. 32 The Evolution and Diversity of Gymnosperms and Angiosperms

View Set

Module 13 - Artificial Intelligence and Automation

View Set

Combustion and Corrosion Reactions

View Set