This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes abstract class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "abstract class" Watch "abstract class" New topic
Author

abstract class

Arulmariappan Ramasamy
Greenhorn

Joined: Mar 06, 2011
Posts: 7
explain about abstract class and interface
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

This is most common interview question. Not something you will like to post as new thread.

Search through Java ranch forum or simple Google and you will get the detailed explanation about difference between interface and abstract class.


SCJP SCWCD AIX SOA
The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein

Javin Paul
Ranch Hand

Joined: Oct 15, 2010
Posts: 281


Check it here , you may find it useful Abstraction in Java


http://javarevisited.blogspot.com - java classpath - Java67 - java hashmap - java logging tips java interview questions Java Enum Tutorial
Christian Joseph
Ranch Hand

Joined: Jan 07, 2011
Posts: 43
for meaning just use Google or Yahoo..

but for the difference(i know theres many difference but imo the important ones are)

Interface has a default public abstract (methods).. and default public static final instance variable.. (when i say default it only means it automatically has that)

while Abstract can be Abstract or concrete members(methods) ..

thats all i know
Sanjeev Ba
Ranch Hand

Joined: Dec 31, 2006
Posts: 40

I think the question scope is very broad. Better to refer to books.

A few things come to mind.

1. Interface can "extend" only interfaces.

2. Abstract classes can extend only one other abstract class and can implement multiple interfaces.

3. Abstract classes can provide implementations of some or all methods.

4. All interface methods are implicitly public and abstract.

And many more.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: abstract class
 
Similar Threads
A question about container!
usage of a class
A mock question
HttpServlet class
ABSTRACT