public class MainTest { @Test public void main() { int i = 0; IntStream.range(0, 10).forEach( rang -> System.out.printf("生成第%d个表sql:%s ", rang, "qsdafads") ); } @Test public void test1() { List<Integer> list = Lists.newArrayList(1, 2, 3, 4, 5, 4, 32, 1, null, 1); list.stream().distinct() .filter(num -> num != null && num != 1) .mapToInt(num -> num * 7) .skip(2).limit(1).forEach(System.out::println); } }