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

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -