+ 6

Multiple classes can implements the same interface ,is that possible?

java

14th Nov 2018, 2:50 PM
B.Tamilarasi
2 Antworten
+ 5
Yes multiple classes can implement one interface irrespective of being in the same program or different. There is no such restriction. Interface only defines the common methods that should be included in the Implementation classes.
14th Nov 2018, 3:30 PM
Maninder $ingh
Maninder $ingh - avatar
0
Yes. Interface is an extreme case of Abstract class. And Abtract class, in the end of the day, is still a class. A class can be inherited multiple times - by one or many other classes.
16th Nov 2018, 6:49 AM
Quang Tran
Quang Tran - avatar