Prepare for your Next Interview
This is a discussion on Is there any benefit to extend both Interface and abstract class within the Java forums, part of the Software Development category; Suppose I have an Interface A, and an Abstract class B which implements Interface A. Now I extend this abstract class B to a normal class C. Is there any ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Is there any benefit to extend both Interface and abstract class
Suppose I have an Interface A, and an Abstract class B which implements Interface A. Now I extend this abstract class B to a normal class C. Is there any need to implement the Interface A here also. Can any on please look on this? Is there any benefit to extend both the Interface A and the the abstract class B which implements A.?
Question asked by visitor Hani |
| Sponsored Links |
|
|||
|
Re: Is there any benefit to extend both Interface and abstract class
hi hani
good question. if class C extends Class B(which is implementing intrface A according to it's requirement) then class C gets all the features of class B and again if class C implements interface A then C can implement it own features.. so now C will get both the class B features and it's own features.. now i think u got something thanks.. |
| The Following User Says Thank You to Surekha venkat For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Abstract, final and static keywords | Geek_Guest | Java | 2 | 12-25-2007 09:48 AM |
| difference between abstract class and interface | manipalreddy.s | Java | 12 | 10-25-2007 07:06 AM |
| Confusion with ABSTRACT and INTERFACE | Geek_Guest | Java | 2 | 05-07-2007 04:38 AM |
| Extend function of Varrays | Jyothi.g | Oracle | 1 | 05-07-2007 03:48 AM |
| interface..... | psuresh1982 | Java | 1 | 01-08-2007 01:40 PM |