Pls find the link for reference: "Strategy for success" article of JavaWorld
My question is why do we need to have separate interface and implement it in abstract class, when we can declare those abstract methods in abstract class itself?
ex in image,
public interface Border(){
paintBorder();
getBorderInsets();
isBorderOpaque();
}
public class abstract AbstractBorder implements Border(){
.....
}
instead we can have abstract class like
public class abstract AbstractBorder {
paintBorder();
getBorderInsets();
isBorderOpaque();
}
why we are using interface? what is the necessity?