I have my code here that would like to change Stringtokenizer to String because the information I get is in sentence and I would like to cut it down to certain part.
StringTokenizer numberOfPost_string = new StringTokenizer( numberOfPost_text , delimiters );
System.out.println( numberOfPost_string.nextToken() );
int numberOfPost = Integer.parseInt(numberOfPost_string);
The problem I encounter is on the line int numberOfPost = Integer.parseInt(numberOfPost_string);
where it gives me error.
Or is there other way for me to cut down sentence and convert it to integer?