13 lines
332 B
Java
13 lines
332 B
Java
import java.lang.Integer;
|
|
import java.util.function.Function;
|
|
import java.util.List;
|
|
import java.util.ArrayList;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Bug325 {
|
|
public main() {
|
|
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5));
|
|
var func = x -> x*2;
|
|
return list.stream().map(func).toList();
|
|
}
|
|
} |