Hi All,
I have little doubt in use of abstract keyword...
abstract classes cannt be instantiated . ( normally)
but this can be overruled by anonymous classes.
then what is the use of having abstract class?
like abstract class classone{
void mon();
}
classone co=new classone {
void mon(){ do something };
}
it was asked in an interview & i couldn't give any satisfying answer..
we can always do it that way ...so what exactly is need ?
that is for sure that we can put common facility in single
class & inherit subclass to add specific implementation in its abstract method ...but that
thing we can always do with normal classes .....
if anyone can throw some light then it will be helpful..
Thanks
shweta