Geeks Talk

Prepare for your Next Interview




Is there any benefit to extend both Interface and abstract class

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 ...


Go Back   Geeks Talk > Software Development > Java

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-05-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 164 Times in 138 Posts
Geek_Guest is on a distinguished roadGeek_Guest is on a distinguished road
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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-08-2007
Junior Member
 
Join Date: Jun 2007
Location: USA
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Surekha venkat is on a distinguished road
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..
Reply With Quote
The Following User Says Thank You to Surekha venkat For This Useful Post:
Reply

  Geeks Talk > Software Development > Java


Thread Tools
Display Modes


Similar Threads

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


All times are GMT -4. The time now is 01:39 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved