Polymorphism 48 Share Posted July 6, 2017 I see. I'm learning as much as possible lately, I really do appreciate you explaining this and helping. Is there anyway you can explain the Lambda expression part? And what it's saying in layman's terms? Essentially my question is; How is what the script is "saying" changed when adding the "() - >" before ground feather? Edit: I just saw Pudge's post above this after asking, so I think I understand now. Another explanation from another person is always helpful still. a lambda is an anonymous function that you use to reduce boilerplater code (code that is used in many places without changes such as in interfaces) lambda expression call the abstract method from a functional interface -- these contain only 1 abstract method otherwise you cannot use lambda for the interface. lambdas have no access modifiers, no return type, and no name -- hence them being anonymous, all they do is call the single abstract method in that interface this site has simple examples https://java2practice.com/2014/03/16/java-8-functional-interface-example/ Link to comment Share on other sites More sharing options...
Rubick 30 Author Share Posted July 6, 2017 a lambda is an anonymous function that you use to reduce boilerplater code (code that is used in many places without changes such as in interfaces) lambda expression call the abstract method from a functional interface -- these contain only 1 abstract method otherwise you cannot use lambda for the interface. lambdas have no access modifiers, no return type, and no name -- hence them being anonymous, all they do is call the single abstract method in that interface this site has simple examples https://java2practice.com/2014/03/16/java-8-functional-interface-example/ You are the man! Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.