object - Java - Create instance of a class with String as name -


i want create instances of class, like:

country ger = new country(); country usa = new country(); ... 

and on. because want huge number of objects, i'd rather want create instances instance names text file country tags listed , iterate through list. familiar java reflection concept, not want create single class each object want cut declarations short.

is there way that?

thanks in advance

add namevariable country , initialize via constructor. or use map.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -