Answer:
Step-by-step explanation:
import java.util.*;
public class Main
{
public static void main(String args[])
{
StringTokenizer st1 =
new StringTokenizer("do { sum = sum + 1 ; } while ( sum < 10 ) ;", " ");
int count=0;
while (st1.hasMoreTokens())
{
count++;
System.out.println("Token "+count+" "+st1.nextToken());
}
System.out.println("Total Tokens :: "+count);
}
}