Geeks Talk

Prepare for your Next Interview




Can a final interface has an abstract method?

This is a discussion on Can a final interface has an abstract method? within the Java forums, part of the Software Development category; Can a final interface has an abstract method? this is very tricky question. So, Plz be careful to provide me the correct answer. -thanks & regards kaushal k sharma...


Go Back   Geeks Talk > Software Development > Java

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-23-2008
Junior Member
 
Join Date: Jun 2008
Location: India
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
kaushalksharma is on a distinguished road
Can a final interface has an abstract method?

Can a final interface has an abstract method?
this is very tricky question. So, Plz be careful to provide me the correct answer.
-thanks & regards
kaushal k sharma
Reply With Quote
The Following User Says Thank You to kaushalksharma For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 06-23-2008
Junior Member
 
Join Date: Jan 2007
Location: pune
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
jkpawar is on a distinguished road
Re: Can a final interface has an abstract method?

implicitly every interface is public abstract.
and u cant use abstract and final with same time because
abstract=must be inheritated.
final=must not be inhreitated. both goes in diff. way.

and all the method of interface is implicitly public abstract.

so means final interface cant be happen.
Reply With Quote
  #3 (permalink)  
Old 07-10-2008
Junior Member
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
srini2203 is on a distinguished road
Re: Can a final interface has an abstract method?

yes by default abstract methods are public.....
Reply With Quote
  #4 (permalink)  
Old 07-10-2008
Junior Member
 
Join Date: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
vvel2008 is on a distinguished road
Re: Can a final interface has an abstract method?

The interfaces are cannot final... So final Interface is not a abstract method
Reply With Quote
  #5 (permalink)  
Old 07-28-2008
Junior Member
 
Join Date: Jul 2008
Location: Bangalore
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
debabrata.mallick7 is on a distinguished road
Re: Can a final interface has an abstract method?

Interface are only used to support multi inheritance in java that means we have to inherit more than one interface in java. But a class or interface qualified with final can not be inherited so there is no meaning of final interface.And now u cat
put a abstract method there.
Reply With Quote
Reply

  Geeks Talk > Software Development > Java


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Difference between interface and abstract class? are they both same mahesh9920 OOPS 17 2 Weeks Ago 02:44 AM
Diff B/W Interface & Abstract class sforsree Java 7 09-30-2008 02:52 AM
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


All times are GMT -4. The time now is 02:50 AM.


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