It seems like it should be simple enough, but im having trouble wrapping my brain around it. Normally you would declare an object in one of a couple ways
ClassName a;
a = new ClassName();
or
ClassName a = new ClassName();
etc…
but since you’re explicitly declaring these at compile time i get confused when Im supposed to code this to happen at runtime. What I want to do is have a new instance of the Class instantiated when a button is clicked. But what I’m not grasping here is how is the object name going to be named if this is happening on button click?
Even worse, Objects don’t have a Name at all.
The variable you are naimg is the reference to the object.
It matters what you decide the object will belong to: