What does -> means in Java

后端 未结 1 780
挽巷
挽巷 2021-01-21 23:15

I am just looking to get an understanding on what the symbol \'->\' means. I wrote a simple method and closed that IDE session. When I returned back to continue my work, it look

相关标签:
1条回答
  • 2021-01-21 23:44

    It is either Java's 8 Lambda Expressions, but since I see the (view) -> grayed out a bit, it is probably folded by your IDE. Check: Settings, Editor, Code Folding and then uncheck "Closures" (anonymous classes implementing a single method).

    EDIT

    Yes, I checked IntelliJ 13. I have JDK 7 installed (I don't have v8 on my system), and checking Settings, Editor, Code Folding and then uncheck "Closures" (anonymous classes implementing a single method) makes them look exactly like the picture in the original question.

    0 讨论(0)
提交回复
热议问题