> Abstract class has abstract methods as well as
> concrete methods but in Interface all methods are
> abstract and varables are static, final.
But that still doesn't make the following an interface:public abstract class NotAnInterface {
public static final String foo= "foo";
public abstract void bar();
public abstract void baz();
}
All is abstract and/or static final; but the above is still just a class.
kind regards,
Jos
> can u please describe the difference in real scenerio
> with any example. I mean where we use Abstract class
> and where we use Interface?
For a nice real world example read the API docs for part of the Collection
framework, e.g. List, AbstractList, ArrayList etc.
kind regards,
Jos