Sams Teach Yourself Java 2 in 24 Hours

Sams Teach Yourself Java 2 in 24 Hours

By Rogers Cadenhead

Summary

When people talk about the miracle of birth, they're probably not speaking of the way a superclass can give birth to subclasses or the way behavior and attributes are inherited in a hierarchy of classes.

However, if the real world worked the same way that object-oriented programming does, every grandchild of Mozart could choose to be a brilliant composer. All descendants of Mark Twain could wax poetic about Mississippi riverboat life. Every skill your direct ancestors worked to achieve would be handed to you without an ounce of toil.

On the scale of miracles, inheritance isn't quite up to par with continuing the existence of a species or getting a good tax break. However, it's an effective way to design software with a minimum of redundant work.

Another timesaver you may come to rely on are JavaBeans, objects that are ready-made for use in other programs. Whether you're using Beans that were developed by other programmers or designing your own, you have one more way to achieve something with fewer ounces of actual toil.

Share ThisShare This

Informit Network