fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. String s = "quick,brown,fox,jumps,over,the,lazy,dog";
  9. int from = s.indexOf(',');
  10. int to = s.indexOf(',', from+1);
  11. String brown = s.substring(from+1, to);
  12. System.out.println(brown);
  13. }
  14. }
Success #stdin #stdout 0.02s 245632KB
stdin
Standard input is empty
stdout
brown