Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

iterable interface in java

List<String> list = new ArrayList><();

list.add("one");
list.add("two");
list.add("three");

Iterator<String> iterator = list.iterator();

while(iterator.hasNext()) {
    String element = iterator.next();
    System.out.println( element );
}
 
PREVIOUS NEXT
Tagged: #iterable #interface #java
ADD COMMENT
Topic
Name
7+4 =