I am trying to send the result of a split() function into an array of strings, but I am getting an exception as follows:
java.lang.ArrayIndexOutOfBoundsException: somenumber
I am using the following code, but it returns that exception:
String[] temp;
temp = result.split(" ");
Any suggestions? I want to send the result of the string split() function into an array of strings, and then print the values in a for loop.
I am getting an out of bounds exception in for loop, I use:
for (int i=0;i<=temp.length;i++)
{
out.println(temp[i]);
}
Stringvariable. Please post a short but complete program which does compile.