answersLogoWhite

0

....

String line = "This is example program with spaces";

String[] tokens = line.split(" ");

System.out.println(tokens.length-1);

.......

User Avatar

Wiki User

14y ago

What else can I help you with?