What does () -> mean in Java?

Basically, the -> separates the parameters (left-side) from the implementation (right side) . The general syntax for using lambda expressions is. (Parameters) -> { Body } where the -> separates parameters and lambda expression body.

Sizin İçin Seçtik  Can we define a constructor in anonymous class Java?

Leave a Reply

Your email address will not be published. Required fields are marked *