Answers for "foreach java list"

4

java foreach list

list.forEach((MyType myObject) -> {/* code */});
Posted by: Guest on March-27-2021
2

iterate a list using iterator

Iterator<String> crunchifyIterator = crunchifyList.iterator();
        while (crunchifyIterator.hasNext()) {
            System.out.println(crunchifyIterator.next());
        }
Posted by: Guest on May-20-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language