Java: Classes and Objects

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

An instance method that stores its parameter into an instance variable is said to be an ________.

Mutator/Setter

A method is allowed to have _______, which represent data that will be supplied when the method is called.

Parameters

Reference variables are known as _______ variables in other programming languages.

Pointer

A mehtod that returns the contents of an object as a string should be named ______.

toString

Which method is used to remove extra space from the beginning and end of a string?

trim

What is the value of 11 + 38 + "THX"?

49THX

The words public and private are _____ _____

Access modifiers

An instance method that returns the value of an instance variable is said to be an _______.

Accessor/Getter

Objects have two properties. One is state. What is the other?

Behavior

To perform an operation on an object, we _______ one of the instance methods associated with the object.

Call

A new object that's been created by copying an existing object is said to be a _______.

Clone

The act of joining two strings together to form a single string is called _______.

Concatenation

The job of a _____ is to initialize instance variables at the time an object is created.

Constructor

An object variable doesn't actually store an object. Instead, it stores a ______ to an object.

Reference

The keyword ______ is placed before a class name in order to create an object.

new

What value can we assign to an object variable to indicate that it doesn't currently store an object?

null

How do you call an instance method

object.methodname(arguments)

Nested inside a class declaration are three kinds of declarations. What are they?

Constructor declarations Variable declarations Method declarations

An object that's no longer accessible through any object variable is said to be _______.

Garbage

An object whose instance variables cannot be changed is said to be _______.

Immutable

The behavior of an object is represented by ______ ______

Instance methods

Once a class has been declared, we can create objects that belong to the class. We say that these objects are ______ of the class.

Instances

The state of an object is stored in _____ _____

Instance variables


Set pelajaran terkait

Operations Management Chapter 14

View Set

Ch. 25 - Male Genitourinary System

View Set

Milady Standard Barbering - Ch 4 Infection Control: Principles & Practices

View Set

Division of Profits and Losses (Ballada)

View Set