You are viewing a single comment's thread. Return to all comments →
above java 11 try using
''' import java.io.; import java.util.;
public class Solution {
public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); if(str.isBlank()){ System.out.println(0); } else{ String[] strArr = str.trim().split("[ !,?._'@]+"); System.out.println(strArr.length); for(String data: strArr){ System.out.println(data); } } 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 →
above java 11 try using
''' import java.io.; import java.util.;
public class Solution {
}
'''