| 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: 276
|
|
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: 37
|
|
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.
|
 |
 |
|
|
subject: abstract class
|
|
|