3 Flashcards

1
Q

If a method has been overridden but you want to use the superclass version within the subclass, you can use the keyword ______ to access the parent class method.

A

super

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

In a subclass, the keywords __________ sometimes refer to the same method, but sometimes they do not.

A

this and super

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

The concept of keeping data private is known as

A

information hiding.

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

When you employ information hiding, your data can be altered only by the __________.

A

methods you choose and only in ways that you can control.

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

When a class serves as a superclass to other classes you create, your ________ inherit all the data and methods of the superclass.

A

subclasses

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

The methods in a subclass can use all of the data fields and methods that belong to its parent, with one exception: _________

A

private members of the parent class are not accessible within a child class’s methods.

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

___________ provides you with an intermediate level of security between public and private access.

A

Protected access

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

Sometimes when you create a class, you might choose ________

A

not to allow subclasses to override some of the superclass methods.

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

The three types of methods that you cannot override in a subclass are:

A

static methods
final methods
Methods within final classes

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