- 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
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
4 months, 3 weeks agognilapon.ebenezaire
6 months, 2 weeks agod7bb0b2
1 year agoOmnisumem
1 year, 4 months ago[Removed]
1 year, 5 months agoAbuMuhammad
1 year, 7 months agoStavok
1 year, 8 months agoJGR_77
1 year, 10 months agoRP384
2 years agoLeksh_geeth
2 years, 2 months ago