Iterating Through Iterator

while(it.hasNext()) {
  System.out.println(it.next());
}