Is there any way that I can take a String and somehow use it as if its the name of one of my declared Objects? For example, if I have an Animal named germanShephard, is there some way I could say String gerSh = "germanShephard"; and then treat gerSh as if it was the equivalent of saying germanShephard in my program?
BestJewSinceJC
700
Posting Maven
Recommended Answers
Jump to PostIf you make your object Serializable then you can store information about the object in String form. It won't be as readable as "germanShepard" but you could store objects serials somewhere to enter. Doesn't sound too practical.
Another thing you can do is make a factory class. The class would …
Jump to PostCan you elaborate somewhat on the first example? The second example seems to make sense - you have a table and its layout set ahead of time, and based on what Strings are input, that table looks up the classnames (presumably each String represents a classname?) then fills the table …
Jump to PostDo you mean that depending on what the contents are of the XML file, different panels would appear which are created from classes that have their own content... but that the type and size of the panel are always the same? Because I don't see how you could use different …
Jump to Posts.o.s, no offense, but sifting through a ton of material to *maybe* answer my question doesn't sound too appealing. If reflection is indeed useful, there have to be some practical, simple explanations of why this is the case.
It seems as though you missed my entire post. The first two …
Jump to PostWhat I was saying is that I don't understand most of that terminology, so the point alone has no impact. I hope I wasn't rude - I wasn't trying to be.
If you work in an environment similar to mine, you'll have people telling you to "GIYF!" quite a bit …
All 28 Replies
Antenka
274
Posting Whiz
destin
6
Junior Poster in Training
Alex Edwards
321
Posting Shark
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
BestJewSinceJC
700
Posting Maven
destin
6
Junior Poster in Training
BestJewSinceJC
700
Posting Maven
destin
6
Junior Poster in Training
BestJewSinceJC
700
Posting Maven
destin
6
Junior Poster in Training
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
BestJewSinceJC
700
Posting Maven
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
bionicseraph
0
Newbie Poster
BestJewSinceJC
700
Posting Maven
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Alex Edwards
321
Posting Shark
bionicseraph
0
Newbie Poster
bionicseraph
0
Newbie Poster
BestJewSinceJC
700
Posting Maven
bionicseraph
0
Newbie Poster
BestJewSinceJC
700
Posting Maven
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
BestJewSinceJC
700
Posting Maven
Alex Edwards
321
Posting Shark
BestJewSinceJC
700
Posting Maven
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Ezzaral
commented:
Good reference.
+15
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.