> It just lets me know about certain properties of an Object, such as its classname
It does much more than that.
> The concept of a Map is somewhat familiar, but it doesn't help avoid the work, does it?
It provides a solution to your problem. IMO, what you are looking for is not a solution but a syntactic sugary way of doing things. Like previously mentioned, either use an array, a map or a JVM targeted scripting language like maybe Groovy, Scala, Rhino etc.
> I guess this isn't possible in Java though.
Yes, in the same way it isn't possible to create classes in C.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
Offline 8,871 posts
since Jun 2006