@@ -0,0 +1,670 @@
+package com.nick.love.myra;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class TestStream %7B%0A%0A%09private static Integer%5B%5D nums = %7B1, 2, 3, 4, 5, 6%7D;%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A       // %E5%AE%9E%E7%8E%B0%E8%BF%94%E5%9B%9E%E6%95%B0%E7%BB%84%E4%B8%AD%E5%80%BC%E5%9C%A8 2 %3C= x %3C= 4 %E8%8C%83%E5%9B%B4%E7%9A%84%E5%85%83%E7%B4%A0%0A%09   // before java8%0A%09   List%3CInteger%3E result = new ArrayList%3CInteger%3E();%0A%09   for (Integer item : nums) %7B%0A%09%09   if (item %3E= 2 && item %3C= 4) %7B%0A%09%09%09   result.add(item);%0A%09%09   %7D%0A%09   %7D%0A%09   System.out.println(result);%0A%09   %0A%09   System.out.println(%22---------------------%22);%0A%09   // java8%0A%09   Arrays.asList(nums).stream()%0A%09     .filter(item -%3E (item %3E= 2 && item %3C= 4))%0A%09     .forEach(System.out :: println);%0A%09%7D%0A%0A%7D%0A

Create TestStream.java