You are viewing a single comment's thread. Return to all comments →
why isn't my code passing all test cases?
import java.util.*; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] s = (sc.nextLine()).split("[ ,!,?._'@]+"); System.out.println(s.length); for (String i: s) System.out.println(i); sc.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 →
why isn't my code passing all test cases?