title: Matching Two List values and finally get a final List with distinct value
body: <p>I have question here. I have two list and both this list have some common elements.
  This common elements along with the values has to be put in another List. which is very annoying as is the requirement.</p>
  
  <p>My Testing Classes are as:</p>
  
  <pre><code>    import java.util.ArrayList;
      import java.util.List;
  
  public class Player {
      private int singleModeVal;
      private int doubleModeVal;
      private String mode;
      private String name;
      public Player(){}
  
      public String getName(){
          return name;
      }
      public void setName(String name){
          this.name = name;
      }
      public int getSingleModeVal(){
          return singleModeVal;
  
      }
      public void setSingleModeVal(int val1){
          this.singleModeVal=val1;
      }
      public int getDoubleModeVal(){
          return doubleModeVal;
      }
      public void setDoubleModeVal(int val2){
          this.doubleModeVal=val2;
      }
      public String getMode(){
          return mode;
      }
      public void setMode(String mode){
          this.mode = mode;
      }
      public List&lt;Player&gt; getSinglePlayerscoreList(){
          List&lt;Player&gt; singlePlayerscoreList = new ArrayList&lt;Player&gt;();
          for(int i=0;i&lt;2;i++){
              Player player = new Player();
              player.setName("A");
              player.setMode("singlePlayerMode");
              player.setSingleModeVal(100);
              player.setDoubleModeVal(200);
              singlePlayerscoreList.add(player);
          }
          return singlePlayerscoreList;
      }
      public List&lt;Player&gt; getDoublePlayerscoreList(){
          List&lt;Player&gt; doublePlayerscoreList = new ArrayList&lt;Player&gt;();
          for(int i=0;i&lt;2;i++){
              Player player = new Player();
              player.setName("B");
              player.setMode("doublePlayerMode");
              player.setSingleModeVal(300);
              player.setDoubleModeVal(400);
              doublePlayerscoreList.add(player);
          }
          return doublePlayerscoreList;
      }
  }
  </code></pre>
  
  <p>The Other class is:</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;
  
  public class Tester {
      private Player player = new Player();
  
      public static void main(String args[]){
          new Tester().showValue();
      }
  
      private void showValue(){
          List&lt;Player&gt; singlePlayerScore = new ArrayList&lt;Player&gt;();
          List&lt;Player&gt; doublePlayerScore = new ArrayList&lt;Player&gt;();
          singlePlayerScore = player.getSinglePlayerscoreList();
          doublePlayerScore = player.getDoublePlayerscoreList();
          List&lt;Player&gt; allScoreList = new  ArrayList&lt;Player&gt;();
          allScoreList.addAll(singlePlayerScore);
          allScoreList.addAll(doublePlayerScore);
              How do i iterate here, and print my data as:
  
  
   Name         singlePlayerScore  Double Player Score  TotalScore     
   A              100                   200                300     
   B              300                   400                700
  
  
       }
      }
  
  }
  </code></pre>
  
  <p>When i iterate i get A twice with its value and B as same.</p>
  
  <p>Is there an efficient way to perform as required.</p>