Query regarding LIST interface and implementation.
interface List{
int size();
boolean isEmpty();
}
abstractclass AbstractListimplements List{
publicint size();
publicboolean isEmpty(){
return size() == 0;
}
}
publicclass ArrayListextends AbstractList(){
publicint size(){
return 0;// placeholder.
}
}
Query :
How can the abstract class AbstractList invoke size() == 0
in isEmpty(), when there is no size() implemented at all?
In ArrayList class, what is the meaning of the placeholder?
If I create an instance of ArrayList and invoke the size(),
wont I always be returned value of 0?

