Your getting java.lang.ArrayIndexOutOfBoundsException because of your variable one.. you initialize it with a value 1.. so When the condition is satisfied the value of your variable one will be...