Hello,
I am coding a small applet and I want to create object dynamically.
lets say I got a class of animal I can create one by:
animal dog = new animal();
However, I want to create as many dogs I like (the user) through the button listeners.
How you can do this and keep track of (or set to your preference) the new object(s) name?
Thanks!
I am coding a small applet and I want to create object dynamically.
lets say I got a class of animal I can create one by:
animal dog = new animal();
However, I want to create as many dogs I like (the user) through the button listeners.
How you can do this and keep track of (or set to your preference) the new object(s) name?
Thanks!