About Question enthuware.ocpjp.i.v11.2.3069 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
girishankaran
Posts: 10
Joined: Wed Aug 08, 2012 5:00 am
Contact:

About Question enthuware.ocpjp.i.v11.2.3069 :

Post by girishankaran »

Compiler is not accepting var in (var a, var b)

ls.sort((var a, var b) -> a.compareTo(b));
It is working without var

Online
admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.i.v11.2.3069 :

Post by admin »

It compiles fine. Check your Java version.

raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

Re: About Question enthuware.ocpjp.i.v11.2.3069 :

Post by raphaelzintec »

yes i agree i learned var cannot be method param type but didnt know lambda accept

Post Reply

Who is online

Users browsing this forum: admin and 13 guests