/* A Java program to illustrate working of StringTokenizer
class:*/
import java.util.*;
public class NewClass
{
public static void main(String args[])
{
System.out.println("Using Constructor 3 - ");
StringTokenizer st3 =
new StringTokenizer("JAVA : Code : String", " :", true);
while (st3.hasMoreTokens())
System.out.println(st3.nextToken());
}
}
Why is the output of the above program is as follows:
Using Constructor 3 - JAVA : Code : String
My question is why it has extra newline characters(i.e. it has blank lines after "Java", ":", "Code" etc)