Chapter 4 Flashcards

(11 cards)

1
Q

Class declaration that signals that the class is usable by all client programs.

A

public

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

Methods and variables that can only be accessed by methods of that class are

A

private

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

How to call constants in a program

A

static final (constants)

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

Method that creates an object of a class

A

Constructor

  • always same name as class
  • no return type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Methods that access a class object without altering the object

A

Accessor methods

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

Method that changes the state of an object by modifying at least on instance variable

A

Mutator methods

Void

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

Two or more methods in the same class that have the same name but different parameter lists

A

Overloaded methods

Ex constructors or think product

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

Keyword used as an implicit parameter for the method

A

this
Ex
this.name = name;

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

Parameters used in the method header

A

Formal parameters

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

Parameters used when using objects

A

Actual parameters

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

Blueprint for an object

A

A class

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