void (Object o) { try { System.out.println("inside try 2"); switch (o) { case Integer n when n > 3 -> { System.out.println("4"); throw new RuntimeException(); } case Object ob -> System.out.println(o); } System.out.println("2"); } catch (UnsupportedOperationException e) { System.out.println("exception"); } finally { System.out.println("finally"); } }