Pedro Borges Pedro Borges - 3 years ago 197
Java Question

Why is java.lang.Number an abstract class instead of an interface?

Answer Source

Technically, it has two non-abstract methods, byteValue() and shortValue(). Prior to Java 8 interfaces couldn't have default method implementations. Only classes could.

Still, you could consider it a design flaw. It took the Java API designers a few iterations to get all of the core classes right. Witness Hashtable and Vector being supplanted by HashMap and ArrayList.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download