February 2014
Beginner
1248 pages
62h 25m
English
• A method that’s declared final (p. 419) in a superclass cannot be overridden in a subclass.
• Methods declared private are implicitly final, because you can’t override them in a subclass.
• Methods that are declared static are implicitly final.
• A final method’s declaration can never change, so all subclasses use the same implementation, and calls to final methods are resolved at compile time—this is known as static binding (p. 420).
• The compiler can optimize programs by removing calls to final methods and inlining their expanded code at each method-call location.
• A class that’s declared final cannot be extended (p. 420).
• All methods in a final class are implicitly final.
Read now
Unlock full access