Chapter 9. Interfaces and Abstract Classes


Terms you'll need to understand:

  • Interface class

  • Abstract class

  • extends

  • implements

  • final

  • Inherit

  • Composition

  • static

Techniques you'll need to master:

  • Differentiating the purposes for an interface and abstract class

  • Identifying Java keywords used to create an interface and abstract class

  • Understanding how to inherit an interface and an abstract class

  • Knowing which methods in an interface or abstract class need to be declared explicitly in the subclass

  • Knowing the difference between overriding and overloading inherited methods and variables

  • Choosing correctly between an interface and abstract class for a given scenario

In this chapter, you review the basics of Java interfaces and abstract classes because your assignment will likely use interfaces or abstract classes or both. Java borrows much of its inheritance ideas from other languages, such as C++ and Smalltalk. However, there are unique features to Java's inheritance model, which are pointed out in this chapter. Interfaces and abstract classes affect the behavior of their subclasses differently than simply inheriting from concrete superclasses.



JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net