You are viewing a single comment's thread. Return to all comments →
Test number 3,6,7,10 are being failed despite giving expected output in individual tests. Used java 8 and 15. Doesn't make any different
Scanner scan = new Scanner(System.in); String s = scan.nextLine(); String[] strArr = s.split("[, .'!?_@]+"); System.out.println(strArr.length); for (String str: strArr) { System.out.println(str); } scan.close();
Seems like cookies are disabled on this browser, please enable them to open this website
Java String Tokens
You are viewing a single comment's thread. Return to all comments →
Test number 3,6,7,10 are being failed despite giving expected output in individual tests. Used java 8 and 15. Doesn't make any different