Question : Which code fragment, when inserted at line n, enables the code to print Harish? 1. checkAge (iList, ( ) -> p. get Age () > 40); 2. checkAge(iList, Person p -> p.getAge() > 40); 3. checkAge (iList, p -> p.getAge() > 40); 4. checkAge(iList, (Person p) -> { p.getAge() > 40; });
Correct Answer : 3 Explanation:
Question : Given the code snippet :
When you run this code, what will be printed
1. X Y Z 2. X Y Z P Q 3. X Y P Q 4. Compilation Error
Correct Answer : 3 Explanation:
Question : Please look into , given code fragement. Select the correct options which will be printed out.