Module 01-11 Inheritance Flashcards
Using inheritance to organize your classes allows you to build a…
Class Hierarchy of your code
True or False: A class can inherit from more than one parent
FALSE
True or False: A class can have more than one child
TRUE
In Java, all Objects (Reference Types) are subclasses of the class…
java.lang.Object (the only class in Java that doesn’t have a superclass)
Even if no superclass is specified, all classes still implicitly extend from java.lang.Object and inherit a set of common methods, such as…
.toString()
.equals()
.hashCode()
True or False: BigDecimals are immutable
True
True or False: BigDecimals can use operators like + or *
False, they must use methods like add()
True or False: BigDecimals don’t have the rounding problem of double and float
True