Assuming that the below code is present in a valid main() method, find the output of the code:
 

 Object obj = "10";
 switch (obj) {
 case Integer i -> System.out.println(i + 5);
 case String s -> System.out.println(s + "5");
 case Long l -> System.out.println(l + 5);
 default -> System.out.println("Unknown");
 }

15

105

15L

Unknown

Verified Answer
Correct Option - b

To get all Infosys Certified Java SE 21 Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in