Equality of instance of functional interface in java [duplicate]
问题 This question already has answers here : Is there a way to compare lambdas? (3 answers) Closed 4 years ago . I am not sure how I can be sure about equality/immutability of functional interface. I guess there might be no way to assure equality when I use this syntactic sugar in java 8, please let me know any hint if you have any. I made a short code snippet for my question. public interface Element { void doSomething(int a); } and I've tried to add instance of this interface in functional way