title: how can i compare two Lists
body: <p>There are two Lists, i want to compare 
  these lists having same values or not
  how can i do this please suggest</p>
  
  <pre><code>List&lt;WebElement&gt; Gender=wd.findElements(By.xpath(".//*@id='MyMember_GenderId']"));
  int genderval=Gender.size();
  System.out.println(genderval);
  for(WebElement G : Gender ) {
      System.out.println("Gender is :"+G.getText());
  }
  List&lt;WebElement&gt; Mstatus=wd.findElements(By.xpath(".//*[@id='MyMember_MaritalStatusId']"));
  int statusval=Mstatus.size();
  System.out.println(statusval);
  for(WebElement text : Mstatus ) {
      System.out.println("Gender is :"+text.getText());
  }
  </code></pre>