This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract method v/s Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract method v/s Interface" Watch "Abstract method v/s Interface" New topic
Author

Abstract method v/s Interface

Gaurav Pavan Kumar Jain
Ranch Hand

Joined: Mar 19, 2007
Posts: 168
Which is best Abstract method or interface while programming in java
Mayur Ramgir
Greenhorn

Joined: Sep 26, 2007
Posts: 8
In order to get a proper response, you need to clarify your question. Your question is bit vague please elaborate it in detail.
[ October 18, 2007: Message edited by: Mayur Ramgir ]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14279
    
  21

In some situations, an abstract class (with an abstract method) is more appropriate, in other situations an interface is more appropriate. One is not always better than the other.

See: JavaRanch FAQ - Interface vs abstract class
[ October 18, 2007: Message edited by: Jesper Young ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Abstract method v/s Interface