need some help with strings and loop

hi guys , i have a simple code:

import javax.servlet.ServletException;

import javax.servlet.http.*;

import javax.servlet.*;

publicclass bandomextends HttpServlet{

publicvoid doGet(HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException

{

PrintWriter out = response.getWriter();

String st ="Today+is+raining";

String sp[] = st.split("\\+");

for(int j=0; j< sp.length; j++)

{

for(int k =0; k<sp.length ;k++)

{

out.println( sp[k]);

}

}

}

}

in output now i get

Today is raining

Today is raining

Today is raining

and how to get output in my page using loops:

Today is raining

Today is

Today

thanks to all

Message was edited by:

newj87>

[1563 byte] By [newj87a] at [2007-11-27 4:30:29]
# 1
k<sp.lengthYour inner loop number of iterations is equal to the number of elements in your sp array which is constant. Perhaps you need a variable instead.>
floundera at 2007-7-12 9:39:46 > top of Java-index,Java Essentials,Java Programming...
# 2
k<=sp.length - 1-j
New_Kida at 2007-7-12 9:39:46 > top of Java-index,Java Essentials,Java Programming...
# 3
its working New_Kid thank you very much
newj87a at 2007-7-12 9:39:46 > top of Java-index,Java Essentials,Java Programming...