Topics

Leave a Reply

18 Comments on "Java 8 Lambda Basics 21 – Method References"

Notify of
avatar

BRIAN O'CORNER
Guest
BRIAN O'CORNER
11 days 2 hours ago

Hi!.. I was trying to use method reference for printing a message e.g. System.out.println("Hello") as System.out::println("Hello"). But I was getting compile time error, Can you please explain it why and how it internally works?

Chiranga Alwis
Guest
Chiranga Alwis
25 days 17 hours ago

Hopefully new tutorials on new Collections improvements

Shahab Younas
Guest
Shahab Younas
27 days 16 hours ago

Interactive tutorial Looking forward Advance Lambda Expression Course, Java9 and Advance Spring Boot. Thank you java brain.

Aryan Singh
Guest
Aryan Singh
1 month 22 days ago

Sir, please create more tutorials on lambda….

ajayyaatri
Guest
ajayyaatri
1 month 26 days ago

Great tutorial.. Man you should do more of this.. hats off to u !!

Nitish Chauhan
Guest
Nitish Chauhan
2 months 19 hours ago
This was unclear to me at first: In the line: Thread = new Thread(MethodReferenceExample2::printMessage); The constructor being used was Thread(Runnable var1){}. Runnable is a functional interface containing a void run(void){} method structure. Since System.out.println() is a void return, void parameters method it matches the functional interface. That's why it can be passed into the Thread(Runnable var1) constructor. Similar to doing: (Interface1) (name1) (class1) (class1 method1) Runnable someprinter = MethodReferenceExample2::printMessage; which is basically: Runnable someprinter = () -> System.out.println("Hello");Thanks again for your teaching style. learning so much
Manjesh Kumar
Guest
Manjesh Kumar
2 months 10 days ago

I do really like this series very useful, so it will be grateful if you make Java 8 series also

vishank gupta
Guest
vishank gupta
2 months 15 days ago

best tutorials sir, please make same on advance lambda…thanks in advance………..

Rafal Otwinowski
Guest
Rafal Otwinowski
2 months 29 days ago

Hello Sir, thank you for your work, please prepare advance lambda

Jerome JJ
Guest
Jerome JJ
4 months 4 days ago

Hey Genius! You knock me dead just like that. Hat's off to you for your selfless initiative. Gratified abundantly as your ardent follower. Keep up the good work.

wpDiscuz