The problem is here:
while (i >= 1 && i <= Integer.parseInt(firstsplit[i])) {
continue;
}
This is an infinite loop since you never change the value of i
inside it. Just comment it to make your application finish. Then, spend some time thinking about how to fix it or what are you trying to accomplish with this loop.