List<String> arrayList = new ArrayList<>();
LinkedList<String> linkedList = new LinkedList<>();
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
List<Integer> evenSquares = numbers.stream()
.filter(n -> n % 2 == 0)
.map(n -> n * n)
.collect(Collectors.toList());
int sum = 0;
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
for (int i : numbers) {
sum += i;
}
ConcurrentHashMap<String, Integer> map = new ConcurrentHashMap<>();
map.put("key1", 1);
map.put("key2", 2);
map.putIfAbsent("key1", 3);
Connection connection = dataSource.getConnection();