I think that is incorrect. Try it.akhter wahab wrote: . . . abstract . . . can't have main method because you can't instantiate them.
I believe I was that "someone".akhter wahab wrote:some one said me that i am instantiating this abstract class anonymously
ravindra patil wrote:it create new Class which extends that abstract class , you can create object of abstract class anonymously ,until you don't have any abstract method in your abstract class..
Campbell Ritchie wrote:
I believe I was that "someone".akhter wahab wrote:some one said me that i am instantiating this abstract class anonymously
Campbell Ritchie wrote:Yes, writing {}; provides a class body which implements all the abstract methods you don't have. You can provide anything you like in an anonymous class, except a constructor.
means providing non abstract method implementation in the abstract base class?if you want to provide any implementation