title: Mapping Array List in java
body: <p>I trying to run this code in java:</p>
  
  <pre><code>List&lt;Map&lt;String , String&gt;&gt; studentList = new ArrayList&lt;&gt;();
  Map&lt;String , String&gt; studentRecord = new HashMap();
  
  //Record for first Student
  studentRecord.put("Name","aaa");
  studentRecord.put("Age","22");
  studentRecord.put("Sex","m");
  studentList.add(studentRecord);
  
  //Record for second Student
  studentRecord.put("Name","bbb");
  studentRecord.put("Age","44");
  studentRecord.put("Sex","f");
  studentList.add(studentRecord);
  </code></pre>
  
  <p>and the output is:</p>
  
  <pre><code>[{Sex=f,Age=44,Name=bbb},{Sex=f,Age=44,Name=bbb}]
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code> [{Sex=m,Age=22,Name=aaa},{Sex=f,Age=44,Name=bbb}]
  </code></pre>
  
  <ul>
  <li>a. What am I doing wrong? </li>
  <li>b. let's say that the output is correct. How can I  print only the "Name"
  value of StudentList[0] which mean "aaa" ?</li>
  </ul>
  
  <p>Thanks</p>