Given: var data = new ArrayList<>(); data.add("Peter"); data.add(30); data.add("Market Road"); data.set(1, 25); data.remove(2); data.set(3, 1000L); System.out.print(data); What is the output? A. [Market Road, 1000] B. [Peter, 30, Market Road] C. [Peter, 25, null, 1000] D. An exception is thrown at…

Given: var fruits = List.of("apple", "orange", "banana", "lemon"); You want to examine the first element that contains the character n. Which statement will accomplish this? A. String result = fruits.stream().filter(f -> f.contains("n")).findAny(); B. fruits.stream().filter(f -> f.contains("n")).forEachOrdered(System.out::print); C. Optional<String> result =…

Assume ds is a DataSource and the EMP table is defined appropriately. What does executing this code fragment do? A. inserts two rows (101, ‘SMITH’, ‘HR’) and (102, ‘JONES’, NULL) B. inserts two rows (101, ‘SMITH’, ‘HR’) and (102, ‘JONES’,…

Given: What is the result? A. The compilation fails at line 9. B. The compilation fails at line 2. C. Hello World D. The compilation fails at line 8.