| Author |
Passing String for an object name
|
Joseph Russell
Ranch Hand
Joined: Jan 08, 2001
Posts: 290
|
|
Is it possible to do this:
|
 |
Randall Twede
Ranch Hand
Joined: Oct 21, 2000
Posts: 4089
|
|
Im not certain. The best thing to do when you have questions like this is to just try it. Try replacing // Other goodies.... with something like this: foo.add(new java.awt.Button("bar"); and see if you get a compile error. I might even try it myself
|
SCJP
|
 |
Joseph Russell
Ranch Hand
Joined: Jan 08, 2001
Posts: 290
|
|
I was getting an error. I think my problem was that I was attempting to name my object from an instance variable inside the method. Joe
|
 |
 |
|
|
subject: Passing String for an object name
|
|
|