Chapter 2: Using Objects Flashcards

1
Q

object

A

A value of a class type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

methods

A

A sequence of statements that has a name, may have parameter variables, and may return a value. A method can be invoked any number of times, with different values for its parameter variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

class

A

A programmer-defined data type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

variable

A

A symbol in a program that identifies a storage location that can hold different values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

initialize

A

Set a variable to a well-defined value when it is created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

integer

A

A number that cannot have a fractional part.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

floating-point numbers

A

A number that can have a fractional part.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

case sensitive

A

Distinguishing upper- and lowercase characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

reserved words

A

A word that has a special meaning in a programming language and there-
fore cannot be used as a name by the programmer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

comments

A

An explanation to help the human reader understand a section of a program; ignored by the compiler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

uninitialized variable

A

A variable that has not been set to a particular value. In Java, using an uninitialized local variable is a syntax error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

public interface

A

The features (methods, variables, and nested types) of a class that are accessible to all clients.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

argument

A

A value supplied in a method call, or one of the values combined by an operator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

void

A

A reserved word indicating no type or an unknown type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

overloading

A

Giving more than one meaning to a method name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

construction

A

Setting a newly allocated object to an initial state.

17
Q

accessor method

A

A method that accesses an object but does not change it.

18
Q

mutator method

A

A method that changes the state of an object.

19
Q

API documentation

A

Information about each class in the Java library.

20
Q

packages

A

A collection of related classes. The import statement is used to access one or more classes in a package.

21
Q

object reference

A

A value that denotes the location of an object in memory. In Java, a variable whose type is a class contains a reference to an object of that class.

22
Q

frame

A

A window with a border and a title bar.

23
Q

component (User-interface component)

A

A building block for a graphical user interface, such as a but- ton or a text field. User-interface components are used to present information to the user and allow the user to enter information to the program.

24
Q

cast

A

Explicitly converting a value from one type to a different type. For example, the cast from a floating-point number x to an integer is expressed in Java by the cast notation (int) x.

25
Q

inner class

A

A class that is defined inside another class.