Java supports class reuse through inheritance and composition. This two-part tutorial teaches you how to use inheritance in your Java programs. In Part 1 you’ll learn how to use the extends
keyword to derive a child class from a parent class, invoke parent class constructors and methods, and override methods. In Part 2 you’ll tour java.lang.Object
, which is Java’s superclass from which every other class inherits.
To complete your learning about inheritance, be sure to check out my Java tip explaining when to use composition vs inheritance. You’ll learn why composition is an important complement to inheritance, and how to use it to guard against issues with encapsulation in your Java programs.
Find A Teacher Form:
https://docs.google.com/forms/d/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ/viewform?edit_requested=true#responses
Email:
public1989two@gmail.com
www.itsec.hk
www.itsec.vip
www.itseceu.uk
Leave a Reply