February 2014
Beginner
1248 pages
62h 25m
English
• In Java SE 8, an interface may declare default methods—that is, public methods with concrete implementations that specify how an operation should be performed.
• When a class implements an interface, the class receives the interface’s default concrete implementations if it does not override them.
• To declare a default method in an interface, you simply place the keyword default before the method’s return type and provide a complete method body.
• When you enhance an existing an interface with default methods—any classes that implemented the original interface will not break—it’ll simply receive the default method implementations.
• With default methods, you can declare common method implementations ...
Read now
Unlock full access