fork download
  1. import java.util.*;
  2. import java.io.*;
  3. class Main {
  4. public static void main(String[] args) {
  5. Scanner src = new Scanner(new InputStreamReader(System.in));
  6. src.useDelimiter("\\s*lol\\s*");
  7. while (src.hasNext()) {
  8. String lol = src.next();
  9. System.out.println(lol);
  10. }
  11. }
  12. }
Success #stdin #stdout 0.06s 246080KB
stdin
1 lol
2 lol
3 lol
4 lol
5 lol
stdout
1
2
3
4
5