In the previous episode we apply the reading interface to the Mother class. Mother extends the Human class with extends while at the same time can implement an interface with implements. We see what the import line does to use an interface from another package, how Eclipse adds it for us, and how we treat an interface as a "signed contract" and implement its bodyless method in the class.
The Spring Boot from Scratch series episode 9 is available on the Opendart Akademi YouTube channel. This series is prepared from recordings of our live Java Spring Boot training; we start from the basics of Java and move toward Spring Boot.
▶ Watch the lesson on YouTubeAll episodes in the series
What’s in this lesson?
- 00:00 Introduction
- 00:03 Mother class extends Human: public members are inherited
- 00:56 Using an interface in a class: implements
- 01:30 "You didn't specify the path" error
- 01:58 What is import? Using a class from another package
- 02:23 Writing the package path manually
- 03:25 Reading the code: "Mother implements the reading interface"
- 03:46 Interface as a contract: you must write the method
- 04:26 Eclipse adding the missing method (Add unimplemented methods)
- 05:00 Method signature must match the interface
- 06:09 Using extends and implements at the same time
- 07:13 An interface can also extend another interface
- 08:01 Running the read method with a Mother instance
- 08:25 Closing
Opendart Akademi
Learn Spring Boot with an instructor in live classes
These videos are recordings from our Java Spring Boot training. The full training covers Java, Spring Boot, REST APIs, databases and real projects; you can ask the instructor when you get stuck.
← Previous episode: What is an Interface in Java? Creating Interfaces and Abstract Methods · Playlist: Spring Boot from Scratch · Subscribe on YouTube
Instructor: İbrahim Gökyar (Opendart Akademi)



