The last standing gunman in a circle I don't know why in most of the interviews, interviewers are asking this question commonly. 

The question is: There are n number of persons standing in a circle. The first person has a gun and he kills the very next person who is alive and hands over the gun to the next person. Who will remain?

Here is my code for the above scenario.
It works, if anyone needs to ask.

public static void void main(String ar[]) {

    int numberOfGuys = 10000;
    List&lt;Integer&gt; list = new ArrayList&lt;&gt;();
    for ( int i = 1; i &lt;= numberOfGuys; i++ ) {
        list.add( i );
    }
    boolean isNeighbour = false;

    System.out.println( list );
    Iterator&lt;Integer&gt; i = list.iterator();
    list = new ArrayList&lt;&gt;();
    boolean isTrue = true;
    while ( isTrue ) {
        int k = i.next();
        if ( isNeighbour )
            i.remove();
        else {
            list.add( k );
        }
        if ( !i.hasNext() ) {
            System.out.println( list );
            i = list.iterator();
            if ( list.size() == 1 )
                isTrue = false;
            list = new ArrayList&lt;&gt;();
        }
        isNeighbour = !isNeighbour;
    }
}
Style review

I think numberOfGuys should be a parameter obtained in the main args, so that you respect the possibility to obtain n from an external source.

As pointed in the comments, don't do isTrue = false, that's... weird. True is always true, period. You could rename it hasRemainingGuys or something like that.


Data structure
Using an ArrayList probably isn't the best data structure for your problem. This data structure is fast when it comes to obtaining data, but removing elements form it, which you do a lot, is slower. You'd want a structure where Remove is an \$O(1)\$ operation and, obviously, where it's easy to navigate from one element to the next. The LinkedList sounds like a good idea, as I'll point out below.
Alternative algorithm
I'd recommend creating some sort of circular linked list, so you wouldn't need to recreate the iterator when you reach the end of the list and to simplify some conditions. The idea is to have a linked list, where the last node's &quot;next node&quot; is the first one. This way, your generator could run until there's no next values.
Iterator&lt;Integer&gt; iterator = circularLinkedList.iterator();
//To start with the &quot;first guy&quot;
int k = -1;
while (iterator.hasNext()) {

    //Move on to the next shooter
    k = iterator.next();

    if (!iterator.hasNext()) {
        break;
    }

    //Move to the next shoot...ee?
    iterator.next();
    iterator.remove();
}

And... yeah, that's all. k contains the last guy standing.
Now, you need to implement a circular linked list and create an iterator that works with it. There are many examples on internet on how to do this.
You could also explore an option where you don't actually remove the element from the list, but simply keep a boolean where an index is flagged as dead or not. This might also be faster.