|
-
September 24th, 2009, 04:33 AM
#3
Re: for loop
Please correct from my code:
String[] choppedUpString = sentence.trim().split(" ");
String tempString="";
for (int i=0; i< choppedUpString.length ; i++)
for(int j=2; j<5; j++){
for (int k=i; k<j; k++)
tempString= tempString+" "+choppedUpString[k];
System.out.println(tempString);
}
I am unable to get the desired output.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|