fork(2) download
  1. import java.util.StringTokenizer;
  2.  
  3. class Ideone {
  4. public static void main (String[] args) {
  5. System.out.println(new StringTokenizer(" ").countTokens() > 1);
  6. System.out.println(new StringTokenizer(" a").countTokens() > 1);
  7. System.out.println(new StringTokenizer("a ").countTokens() > 1);
  8. System.out.println(new StringTokenizer(" a ").countTokens() > 1);
  9. System.out.println(new StringTokenizer("a").countTokens() > 1);
  10. System.out.println(new StringTokenizer(" a b").countTokens() > 1);
  11. System.out.println(new StringTokenizer("a b").countTokens() > 1);
  12. }
  13. }
  14.  
  15. //https://pt.stackoverflow.com/q/311376/101
Success #stdin #stdout 0.08s 27736KB
stdin
Standard input is empty
stdout
false
false
false
false
false
true
true