- var i1 = 1, i2 = 2; - ERROR - var isn't allowed in a compound declaration
- can not mix var with explicit types (var s1, String s2)
- local variables declared with var are non-final by default. However, the final modifier can be added to var declarations:
B AND E:
BiPredicate<Integer, Integer> test = (final Integer x, var y) -> (x.equals(y)); => BAD MIX TYPES
BiPredicate<Integer, Integer> test2 = (var x, final var y) -> (x.equals(y)); => OK
BiPredicate<Integer, Integer> test3 = (Integer x, final var y) -> (x.equals(y)); => MIX
BiPredicate<Integer, Integer> test4 = (final var x, y) -> (x.equals(y)); => Y NOT TYPE
BiPredicate<Integer, Integer> test5 = (Integer x, final Integer y) -> (x.equals(y)); => OK
This section is not available anymore. Please use the main Exam Page.1z0-819 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
9 months, 3 weeks agognilapon.ebenezaire
11 months, 2 weeks agod7bb0b2
1 year, 5 months agoOmnisumem
1 year, 9 months ago[Removed]
1 year, 10 months agoAbuMuhammad
2 years agoStavok
2 years agoJGR_77
2 years, 3 months agoRP384
2 years, 5 months agoLeksh_geeth
2 years, 7 months ago