Your code does not reflect the output, but anyhow you might want to use the String.split()
functions instead of a tokenizer, when you want to access an arbitrary token, e.g.:
String st = "a;b;c";
String[] tokens = st.split(";");
System.out.println(tokens[0]);
will print out "a", the first token.
The StringTokenizer
class allows only to access token after token, you cannot access a token in a random access way. But you can use it also to access the first token:
String st = "a;b;c";
StringTokenizer tokenizer = new StringTokenizer(st,";");
System.out.println(tokenizer.nextToken());
Will also print out "a", the first token.