Explanation: System.out::println is used to print each element.
Dear candidates you will find MCQ questions of JAVA here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
Explanation: System.out::println is used to print each element.
Explanation: It is an instance method of the specific object System.out.
Explanation: `Employee::getAge` retrieves the age property.
Explanation: `Function<String, Integer>` matches input String and returns Integer length.
Explanation: `ArrayList::new` is a constructor reference.
Explanation: `Integer::compareTo` can be used to compare integers.
Explanation: `String::compareToIgnoreCase` compares two strings ignoring case.
Explanation: `Employee::new` is the constructor reference replacing the no-arg lambda.
Explanation: `String::toUpperCase` maps strings to uppercase.
Explanation: `String::length` returns the length of each string.