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
Post a Comment