+ 1

Java symbol ( -> ) and ( = )

Which one you prefer? did they same?

14th Jun 2019, 2:57 PM
Tzion
Tzion - avatar
2 Respuestas
+ 7
-> is used in lambda expressions = is used to assign a value to a variable
14th Jun 2019, 3:05 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
you can currently see the arrow -> in the switch statement too (in Java 12 as a preview feature)
14th Jun 2019, 5:05 PM
zemiak