Java Reference
In-Depth Information
Keep in mind that a programming language is only part of the technology for
writing programs. To be successful, a programming language needs feature-rich
libraries, powerful tools, and a community of knowledgeable and enthusiastic
users. Several very well-designed programming languages have withered on the
vine, whereas other programming languages whose design was merely Ȓgood
enoughȓ have thrived in the marketplace.
427
428
CHAPTER SUMMARY
1. Use interface types to make code more reusable.
2. A Java interface type declares a set of methods and their signatures.
3. Unlike a class, an interface type provides no implementation.
4. Use the implements keyword to indicate that a class implements an interface
type.
5. Interfaces can reduce the coupling between classes.
6. You can convert from a class type to an interface type, provided the class
implements the interface.
7. You need a cast to convert from an interface type to a class type.
8. Polymorphism denotes the principle that behavior can vary depending on the
actual type of an object.
9. Early binding of methods occurs if the compiler selects a method from several
possible candidates. Late binding occurs if the method selection takes place
when the program runs.
10. An inner class is declared inside another class. Inner classes are commonly
used for tactical classes that should not be visible elsewhere in a program.
11. User interface events include key presses, mouse moves, button clicks, menu
selections, and so on.
12. An event listener belongs to a class that is provided by the application
programmer. Its methods describe the actions to be taken when an event occurs.
Search WWH ::




Custom Search