It is so important to know that Tokenizer exists and to know what tools you have available to make your code powerful!
Try to solve this challenge before seeing the answer below.
Answer: This is an easy one. We created the object Scanner passing the String to be tokenized, separated by a pattern. At first, you’ve got to know what the symbols on the tokens mean.
This symbol is called Regex. Many languages use the same concept:
In simple words, this symbol “[^\\w*]” means “not a word” so it will tokenize by the comma “,“.
The result is: