I figured out how to do it for a String
and an int
but I am having trouble figuring it out for char
. When I try to compile it gives me an error that I have a string token for a char
.
StringTokenizer stk = new StringTokenizer(line);
String name = stk.nextToken();
char sex = stk.nextToken();
int count = Integer.parseInt(stk.nextToken());