import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.factory.Lists; public class Main { public static void main(String[] args) { MutableList<Integer> numbers = Lists.mutable.of(1, 2, 3, 4, 5); MutableList<Integer> squaredNumbers = numbers.collect(n -> n * n); squaredNumbers.each(System.out::println); } }


上一篇:
下一篇:
切换中文