Question: Please dont copy answers from previous posts Write a class Triple that contains a single array with exactly three elements, 1, 2 and 3. Then
Please dont copy answers from previous posts
Write a class Triple that contains a single array with exactly three elements, 1, 2 and 3. Then write a custom Iterator' For Triple such that the iterator will return an endless repeating sequence of the array elements?. Use the iterator to print a sequence of ten items from your array using exactly this main(): public static void main(String[] args) { Triple t = new Triple(); Iterator ti = t.iterator(); for(int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
