Josephus Problem with cyclic iterator
Your indentation is off: there should be a level also after class, not only in methods:

class CyclicIterator {
    // Class members here
}


Always try to instantiate to an interface, not an implementation:
This:

LinkedList&lt;Integer&gt; list = new LinkedList();


Should be:

List&lt;Integer&gt; list = new LinkedList&lt;&gt;();


Note there the diamond operator &lt;&gt; to actually get a genericized list. Without it, you should have got a compiler warning about using raw lists. The diamond operator is shorthand for giving the generic type to the implementation: List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;();

I would also prefer using System.out.format to just smashing strings together in a println call: System.out.format("For members %s:%n");