not sure why its failing here, i feel like the logic should repeat 13 times until its shuffled the strings about.
anyone see something i cant?
package com.codegym.task.task07.task0711;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Remove and insert
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
ArrayList<String> strings = new ArrayList<>();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
//add 5 random words to strings array
for(int i = 0; i < 5; i++){
strings.add(i, reader.readLine());
}
String store = "";
//remove the last string and insert it at the beginning.
for(int b = 0; b < 13; b++)
{
store = strings.get(5);
strings.remove(5);
strings.add(0,store);
}
for(int c =0; c<5; c++){
System.out.println(strings.get(c));
}
}
}