Module 01-11 Inheritance Flashcards

1
Q

Using inheritance to organize your classes allows you to build a…

A

Class Hierarchy of your code

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

True or False: A class can inherit from more than one parent

A

FALSE

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

True or False: A class can have more than one child

A

TRUE

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

In Java, all Objects (Reference Types) are subclasses of the class…

A

java.lang.Object (the only class in Java that doesn’t have a superclass)

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

Even if no superclass is specified, all classes still implicitly extend from java.lang.Object and inherit a set of common methods, such as…

A

.toString()
.equals()
.hashCode()

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

True or False: BigDecimals are immutable

A

True

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

True or False: BigDecimals can use operators like + or *

A

False, they must use methods like add()

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

True or False: BigDecimals don’t have the rounding problem of double and float

A

True

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