Kathryn explains inheritance, one of the fundamental concepts in object-oriented programming. She introduces many of the keywords associated with inheritance in Java, and walks you through a program that uses inheritance.
- [Instructor] Inheritance is another fundamental principle…in object-oriented programming,…and it is when one class acquires…the methods and fields of another.…The class which inherits the properties of the other…is known as the subclass, or derived class, child class.…The class whose properties are inherited…is known as the superclass, or base class, parent class.…Every object in Java inherits from the object class…implicitly so that they can have basic features which,…according to Java, every class should have.…
Some of these include clone, equals, toString, et cetera.…In Java, the way we implement inheritance…is through the word extends.…A class uses the keyword extends…to inherit the properties of another class.…Although every object inherits from the object class,…we don't see this keyword extends because it is implicit.…However, let's see what it looks like…to use inheritance in a program.…Here we have an Insect class that lists out…certain methods and fields every insect should have…with a given implementation.…
- Downloading Java 9 and choosing an IDE
- Understanding Java basics: data types, strings, arrays, and more
- Controlling flow with functions and loops
- Working with inheritance and interfaces
- Learning lambda
Skill Level Beginner
1. Getting Started
2. Java Basics
3. Control Flow
4. Beyond the Basics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.