This is Akshatha. I\'m stuck in parsing the following data. I want to fetch each word individually. Can I have a sample code so that I can proceed
RTRV-HDR RH
How about using a Stringtokenizer to fetch each word?
import java.util.*;
public class ReverseWords {
public static void main( String args[] ) {
String s = "Go to the main menu. Quick!";
StringTokenizer tokens = new StringTokenizer(s);
StringBuffer ab;
while (tokens.hasMoreTokens()){
ab = new StringBuffer (tokens.nextToken());
// do your processing
}
System.out.println();
}
}