You are viewing a single comment's thread. Return to all comments →
here is final answer:
Iterator it=mylist.iterator(); while(it.hasNext()){ Object element = it.next(); if(element instanceof String){ if (String.valueOf(element).matches("[a-zA-Z]")) { System.out.println(element); } }else{ continue; }//Hints: use instanceof operator break; } return it;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Java Iterator
You are viewing a single comment's thread. Return to all comments →
here is final answer:
}