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

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -