@@ -0,0 +1,1721 @@
+package Iterator;%0A%0Aimport java.util.Iterator;%0A%0A/**%0A * Created by admin on 26.05.2017.%0A */%0Apublic class IteratorArrayNumbers implements Iterator%3CInteger%3E %7B%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D a = %7B54, 434, 32, 5, 11, 13, 17, 19, 192, 7, 74, 28, 9, 13%7D;%0A        IteratorArrayNumbers iteratorArrayNumbers = new IteratorArrayNumbers(a);%0A        while (iteratorArrayNumbers.hasNext()) %7B%0A            iteratorArrayNumbers.next();%0A        %7D%0A    %7D%0A%0A    private int index = 0;%0A    private int%5B%5D a;%0A%0A    public IteratorArrayNumbers(int%5B%5D a) %7B%0A        this.a = a;%0A    %7D%0A%0A    @Override%0A    public boolean hasNext() %7B%0A        int j = index;%0A        for (; j %3C a.length; j++) %7B%0A            int temp = 2;%0A            int i = a%5Bj%5D;%0A            if (i == 3 %7C%7C i == 5 %7C%7C i == 7) %7B%0A                return true;%0A            %7D%0A            int k = 1;%0A            while (temp != 10) %7B%0A                if (i %25 temp++ == 0) %7B%0A                    k = 0;%0A                %7D%0A            %7D%0A            if (k == 1) %7B%0A                return true;%0A            %7D%0A        %7D%0A        return  false;%0A    %7D%0A%0A%0A    @Override%0A    public Integer next() %7B%0A        for(; index %3C a.length;) %7B%0A            if (a%5Bindex%5D == 3 %7C%7C a%5Bindex%5D == 5 %7C%7C a%5Bindex%5D == 7) %7B%0A                return a%5Bindex++%5D;%0A            %7D%0A            int temp = 2;%0A            int k = 0;%0A          while (temp != 10) %7B%0A              if (a%5Bindex%5D %25 temp++ == 0) %7B%0A                  index++;%0A                  k = 1;%0A                  break;%0A              %7D%0A          %7D%0A            if (k != 1)%7B%0A                System.out.println(a%5Bindex%5D);%0A                return a%5Bindex++%5D;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    @Override%0A    public void remove() %7B%0A%0A    %7D%0A%7D%0A

task 150