my dog learned polymorphism
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract method v/s Interface" Watch "Abstract method v/s Interface" New topic

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

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: 15092

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
I agree. Here's the link:
subject: Abstract method v/s Interface
jQuery in Action, 3rd edition