+ 2
Can anyone tell the difference between abstract class and an Interface in Java??
Both of them contains method without its definition right?
4 Antworten
+ 4
Interfaces have abstract Methods. For example.
public interface Series
int getNext(); //return next number in Series
void reset(); //restart
void setStart (int x); //set starting value
+ 2
abstract class can contain both static and non static data members, abstract method but interface contains only static data members and abstract methods
+ 2
abstract class allows constructor but interface not allows constructor..
+ 1
Thanks vasu