Question: 3. Java String Tokens (2 pts) (https://www.hackerrank.com/challenges/java-string- tokens/problem) Given a string , matching the regular expression [A-Za-z !,?._'@]+, split the string into tokens. We define
3. Java String Tokens (2 pts) (https://www.hackerrank.com/challenges/java-string- tokens/problem) Given a string , matching the regular expression [A-Za-z !,?._'@]+, split the string into tokens. We define a token to be one or more consecutive English alphabetic letters. Then, print the number of tokens, followed by each token on a new line. Note: Use String.split() method, remember to trim the leading and trailing space characters Sample input He is a very very good boy isn't he? Sample Output good
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
