fork(7) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.stream.*;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Ideone
  7. {
  8. public static void main (String[] args)
  9. {
  10. IntStream.range(1, 10).filter(a -> a % 2 == 0).forEach(System.out::println);
  11. }
  12. }
Success #stdin #stdout 0.2s 320832KB
stdin
Standard input is empty
stdout
2
4
6
8