Question: Delimiters.java 1 package stringsplit; 2 3 public class Delimiters { * Determines the number number of tokens which exist when the given * delimiter is

Delimiters.java 1 package stringsplit; 2 3 public class Delimiters { * Determines the number number of tokens which exist when the given * delimiter is applied to the given string. * Oparam toSplit the string to be split @param delimiter the delimiter used to split the string * @return the number of tokens 8 9 10 11 12 13 14 15 ) public static int countTokens (String toSplit, String delimiter) { } String Split Implement the function public static int countTokens (String toSplit, String delimter) in the manner described by the comments. Use aplit For example: "some interesting text" and "t" would be 4. "some interesting text" and "z" would be 1. (split() returns 1 if the character is not in the text)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
