Question 101
Given the code fragment:
What is the result?
Question 102
Which two reasons should you use interfaces instead of abstract classes? (Choose two.)
Question 103
Given the code fragment:
And given the requirements:
* If the value of the qty variable is greater than or equal to 90, discount = 0.5
* If the value of the qty variable is between 80 and 90, discount = 0.2 Which two code fragments can be independently placed at line n1 to meet the requirements?
Question 104
Given the code fragment:
List<Integer> list1 = Arrays.asList(10, 20);
List<Integer> list2 = Arrays.asList(15, 30);
//line n1
Which code fragment, when inserted at line n1, prints 10 20 15 30?
Question 105
Given the code fragment:
List<String> nL = Arrays.asList("Jim", "John", "Jeff");
Function<String, String> funVal = s -> "Hello : ".contact(s);
nL.Stream()
.map(funVal)
.peek(System.out::print);
What is the result?
