You are viewing a single comment's thread. Return to all comments →
String [] tokens = s.trim().split("[^A-Za-z]+"); int n = tokens.length; System.out.println(n); for(String token: tokens){ System.out.println(token); }
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 →
String [] tokens = s.trim().split("[^A-Za-z]+"); int n = tokens.length; System.out.println(n); for(String token: tokens){ System.out.println(token); }