Hackerrank Java Iterator Solution
Java Iterator class can help you to iterate through every element in a collection. Here is a simple example:import java.util.*;public class Example{ public static void main(String []args){ ArrayList mylist = new ArrayList(); mylist.add("Hello"); mylist.add("Java"); mylist.add("4"