I read that the major difference between Class and Abstract Class is , abstract class cannot be instantiated,
but i can create object for abstract class
public abstract class Earth {
abstract void sand();
void land() {
}
}
and using new key word i created the object, for the abstract
Earth mEarth = new Earth() {
@Override
void sand() {
}
};
I had some questions on it which have not proper answer on Inet,
1) is new keyword is used to instance the class ?
2) is instance is nothing but object ?
3) is mEarth is called object (instance of Earth) ?
now i can call any method (as callback or as value return) mEarth.sand(); mEarth.land(); using earth object