How to initialize variables from list in Java? -


Let's say I've made a list of names such as:

  Martin Paul Diego Damien et al.  

And I need to start, respectively, for example (psuedocode):

  Martin int = 0;  

and you create one output for everyone, which is (psuedocode):

  System.out.println (Martin + "Martin Fountain" ;  

How to do this automatically

For Hashmap , which gives the keyboard value for their values.

  Hashmap  map = new hashmapped  Gt; (); map.put ("Martin", 0); // etc. system.out.println (map.get ("Martin"));  

You can see this Are you that What you can do with this, but you will need specially for this class.


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -