abstract : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

abstract
An formally unfinished class or method, marked with the keyword abstract. It is a way of preventing someone from instantiating a class that is supposed to be extended first. An abstract class is deliberately missing some or all of the method bodies. An abstract method is deliberately missing its method body. An abstract class is similar to an interface which is missing all the method bodies. An abstract class provides a base for someone to extend an actual class. You can’t use new on abstract classes, but you can use abstract references, which always point to objects of a class that extends the abstract class. Interfaces are implicitly abstract as are all their methods.

To use make practical use of an abstract class, you must define a non-abstract class that extends the abstract one. It can use any of the inherited non-abstract methods. It must implement any of the abstract ones.

Sometimes a abstract class may extend another abstract class. In that case it need not implement all the non-abstract methods.

A way to cut down on clutter is to avoid various trivial custom configuring methods that your concrete classes must implement. Instead have the configuring constructor pass the configuring data to the generic abstract constructor, much the way a convenience constructor passes constants to an elaborate constructor to fill in the defaults.


This page is posted
on the web at:

http://mindprod.com/jgloss/abstract.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\abstract.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.145.42.50]
You are visitor number