why interface is introduced in java? The abstract class only do the job of interface then, what is use of interface ? Abstract class can have common methods and abstract methods so that if class need to implement methods which interface forced to imppliments ,instead class can extend abstract class which also forced to implement methods like interface and child class can get inherits methods of abstract class which interface dosent have this facilty .
Asked
Active
Viewed 263 times
-1
-
http://stackoverflow.com/questions/13990798/event-listeners-in-java – Andrey Nov 28 '13 at 09:03
-
One of the multiple reasons is that Multiple inheritance is only possible with interfaces – Mik378 Nov 28 '13 at 09:05
-
By name shake it will provide multiple inheritance.Just it will force to impliment all methods which are used in class ..It not will help like multiple inheritance in C++. – user3045056 Nov 28 '13 at 12:24
-
Multiple inheritance means ,Class should just use method of extended classes but not impliment anything .But in java interfaces force to implements all methods which class wants to use interfaces. – user3045056 Nov 28 '13 at 12:29