fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. StringTokenizer st = new StringTokenizer("12.345.6789", ".");
  10. List<String> numeros = new ArrayList<String>();
  11. while(st.hasMoreTokens()){
  12. numeros.add(st.nextToken());
  13. }
  14. System.out.println(numeros.get(0).length());
  15. }
  16. }
Success #stdin #stdout 0.09s 320320KB
stdin
Standard input is empty
stdout
2