Pl review the code snippet below and suggest any improvements
private static List<Integer> l;
private static void removeQ() {
l = new ArrayList<>();
IntStream.range(0, 100).forEach((i) -> l.add(i));
l.remove(10);
}
You can find the answer here.
private static List<Integer> l;
private static void removeQ() {
l = new ArrayList<>();
IntStream.range(0, 100).forEach((i) -> l.add(i));
l.remove(10);
}
Comments
Post a Comment