#7.5 Java Tutorial | Functional Interface | Lambda Expression

  Рет қаралды 130,528

Telusko

Telusko

6 жыл бұрын

Instagram : / navinreddyofficial
Linkedin : / navinreddy20
Discord : / discord
More Learning :
Java - bit.ly/3xleOA2
Python :- bit.ly/3H0DYHx
Django :- bit.ly/3awMaD8
Spring Boot :- bit.ly/3aucCgB
Spring Framework :- bit.ly/3GRfxwe
Servlet & JSP :- bit.ly/3mh5CGz
Hibernate Tutorial :- bit.ly/3NWAKah
Rest API | Web Service Tutorial :- bit.ly/38RJCiy
Git :- bit.ly/3NUHB3V
JavaScript :- bit.ly/3mkcFys
Kotlin :- bit.ly/3GR2DOG
Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
www.telusko.com/contactus

Пікірлер: 115
@dataguy7013
@dataguy7013 3 жыл бұрын
Telusko, you explain theory, the why and implementation really well. Best video series on java so far
@st-wq3kj
@st-wq3kj 3 жыл бұрын
that was a great explanation. When you removed those extra parts I totally understood the concept. Tnx mate.
@ZombiePhoenix
@ZombiePhoenix 4 жыл бұрын
I've watched a few videos on functional interfaces, and it didn't click for me before. Your video however, explained it the best for me. Thank you!
@vladanulardzic5859
@vladanulardzic5859 4 жыл бұрын
Great! Everything is clear. Explanation in shortest time. Easy to understand. Thank you. Keep on...
@rajsankhe4217
@rajsankhe4217 5 жыл бұрын
You are the best sir, Thanks a lot :)
@chnagaraju6873
@chnagaraju6873 Жыл бұрын
finally I got one of the best tutorial in KZfaq 😊
@divyajothimani7544
@divyajothimani7544 2 жыл бұрын
Thank You Navin Sir for the clear explanation !! You are always a life saver !! 🙂
@elijohua
@elijohua 4 жыл бұрын
Amazing, I finally get it, thank you!
@riteshkumarsinha7823
@riteshkumarsinha7823 6 жыл бұрын
Thanks sir for explaing in such a great way
@Demopanz
@Demopanz 2 жыл бұрын
Thank you for the explanation and the clear cut showing of the why, explaining scala also helped alot
@JavaSpringyFun
@JavaSpringyFun 5 жыл бұрын
Great tutorial on Lambda :)
@jassinakhlaqi5474
@jassinakhlaqi5474 4 жыл бұрын
Simple, fast and good example! Thank you for this video.
@rupn9633
@rupn9633 2 жыл бұрын
Great explanation, cristal clear tattooed in my brain now.
@saravananvishnu6584
@saravananvishnu6584 4 жыл бұрын
Thanks Bro. Clear explanation. Keep continue posting
@RajeshVerma-rs9rp
@RajeshVerma-rs9rp 4 жыл бұрын
Thanks for simplfying concept of lambda expression.
@santhoshPatels
@santhoshPatels 2 жыл бұрын
It's clear and simple explanation.
@KhalidKhan-oh1iv
@KhalidKhan-oh1iv 4 жыл бұрын
I spent 2nd half of the video with my eyes closed... Great stuff thanks!
@jatinlanje5741
@jatinlanje5741 Жыл бұрын
not suppose to be but great! 😄
@shilpinigotiya7479
@shilpinigotiya7479 3 жыл бұрын
This tutorial explains very well.
@shashankgk2028
@shashankgk2028 4 жыл бұрын
Understood. thank you.
@rohitghadge9173
@rohitghadge9173 4 жыл бұрын
thanks a lot i finally understand lambda expression
@katdareshruti
@katdareshruti 3 жыл бұрын
You are the best!
@latentsoul3320
@latentsoul3320 Жыл бұрын
Thank you so much sir. It is very lucid ❤
@AzeemKhan-ht2zd
@AzeemKhan-ht2zd 5 жыл бұрын
Great Sir....... Thanks a lot
@C.Sakthivignesh
@C.Sakthivignesh Жыл бұрын
Thanks sir for made this video.
@smellthel
@smellthel 3 жыл бұрын
Thank you man
@rajnikanthofficial7111
@rajnikanthofficial7111 3 жыл бұрын
This is the best explaination of lambda, even I understood. Before I didn't
@govardhanp5209
@govardhanp5209 3 жыл бұрын
Anthe antav aithe 👍
@-indeed8285
@-indeed8285 6 жыл бұрын
Thank you SIR,, next video please.
@ysheepy4907
@ysheepy4907 3 жыл бұрын
Very well explained, much better than my university professor LOL
@pascualrosario8633
@pascualrosario8633 2 жыл бұрын
understood it ! good video
@alapatisrikanth3412
@alapatisrikanth3412 6 жыл бұрын
why it isn't implementing interface Abc() in sub class . reply pls??
@VitaliaBonita
@VitaliaBonita 4 жыл бұрын
thanks, good explanation
@Fer-jf3pl
@Fer-jf3pl 4 жыл бұрын
Great explanation
@vikramravichandran9607
@vikramravichandran9607 6 жыл бұрын
Keep rocking
@alkapriya3082
@alkapriya3082 6 жыл бұрын
Thank you sir
@kirankamath5891
@kirankamath5891 4 жыл бұрын
thanks for the explanation
@sankarasubramanian568
@sankarasubramanian568 Жыл бұрын
Thanks buddy !
@amitkumargouda1768
@amitkumargouda1768 5 жыл бұрын
learnt something new
@sarveshnerurkar8151
@sarveshnerurkar8151 2 жыл бұрын
Closing eyes and guessing new A() was very intuitive 😁
@elumalaim6857
@elumalaim6857 4 жыл бұрын
But sir, we can't create object of interface right? then how u doing this Abc obj=new Abc() ;
@challasaibharath4866
@challasaibharath4866 3 жыл бұрын
In right hand side , ie the obj side, since you have Abc() which refers to a new class address(as we know the purpose of this is to create an anonymous class which is automatically used to implement the interface which is used as reference). So interface and class are 2 diff things here and can have the same name . Thanks !
@sakibsnature2479
@sakibsnature2479 3 жыл бұрын
wow i understand a lot thanks
@rahulgoti3864
@rahulgoti3864 6 жыл бұрын
Thank You
@yeshwanthln7621
@yeshwanthln7621 2 жыл бұрын
nailed it.
@-indeed8285
@-indeed8285 6 жыл бұрын
thank you sir,,,,,,,,,,, please please next videos upload kijeye,, intejar meho..
@asta5583
@asta5583 3 жыл бұрын
Thank yu😁
@real_hello_kitty
@real_hello_kitty 4 жыл бұрын
Oooo.... Thanks 😊.
@deepakbhardwaj9543
@deepakbhardwaj9543 6 жыл бұрын
Sir where is #7.4 of Java beginners tutorial
@licoyrodriguez3498
@licoyrodriguez3498 3 жыл бұрын
I was watching other tutorial and I repeated the video 5x and still have a bit of confusion. After only watching this video once, I would say I get the idea of lambda and functional interface.
@user-ti4fq8jz8e
@user-ti4fq8jz8e 8 ай бұрын
Hi Navin sir, Could you please also make a tutorial on Kafka ?
@avijitsharma5050
@avijitsharma5050 5 жыл бұрын
Comparator is also a functional interface ( since it has @FunctionalInterface annotation ) but it has two methods - compare() & equals() . Why doesn't compiler throw error while using Comparator interface ??????
@shotx333
@shotx333 2 жыл бұрын
equals is the method of Object class
@tharunkumar9208
@tharunkumar9208 3 жыл бұрын
I cant find the remaining modules 5&6....it gies directly from 4 to 7
@devireddyfavreddy4785
@devireddyfavreddy4785 6 жыл бұрын
In real time how it's helpful,with only one method in interface
@arsal123
@arsal123 4 жыл бұрын
I have the same question. I want to see some use case for a functional interface..
@bobzerotz5539
@bobzerotz5539 2 жыл бұрын
03:31 Navin close your eyes... me: I closed my eyes to the end coz he didnt say open your eyes
@joelboardgamerpger5393
@joelboardgamerpger5393 3 жыл бұрын
Navin, do you have any books?
@digitalnomadg
@digitalnomadg 6 жыл бұрын
How can you able to create object of an interface ?
@teluskosupport1
@teluskosupport1 Жыл бұрын
you cannot create object of interface
@juanpunch8473
@juanpunch8473 3 жыл бұрын
hey is it okay to have multiple method and still use lambda?? how do you do that?
@teluskosupport1
@teluskosupport1 Жыл бұрын
no you cannot make multiple method interface to lambda expression. Exactly one method is allowed
@ankittiwari2220
@ankittiwari2220 6 жыл бұрын
Sir make a vedio on how to code on HackerEarth
@digitalnomadg
@digitalnomadg 6 жыл бұрын
We can't create object of a interface. How is this possible ?
@pragyarawal5242
@pragyarawal5242 6 жыл бұрын
Even i wonder...
@omkaar87
@omkaar87 6 жыл бұрын
it is a object of annonymous inner class not interface
@ks25140
@ks25140 4 жыл бұрын
@Dr Pi k
@IHACKYOU4U
@IHACKYOU4U 6 жыл бұрын
How can you create of object of an inerface.
@IgorRusu
@IgorRusu 5 жыл бұрын
basically you have a new object in memory which defines method show() (defines - gives body //gives curly brackets {}) through the help of lambda expressions
@manjusha9630
@manjusha9630 5 жыл бұрын
we can not create an instance for an interface
@renecabuhan1675
@renecabuhan1675 3 жыл бұрын
Amazing I really thought that interface is a none static.
@teluskosupport1
@teluskosupport1 Жыл бұрын
instance varible of interface is public static final by default , by default method inside interface are in public abstract ...
@mihirsakaria6690
@mihirsakaria6690 3 жыл бұрын
Can we add parameters to the functional interface too ? like Abc obj = (int a,int b) -> System.out.println(a*b); and correspondingly change that in the interface too ? why it doesnt work ?
@teluskosupport1
@teluskosupport1 Жыл бұрын
suppose an wenhave interface A{ void Help(int a, intb); } this is also a fuctional interface.
@himanshuupreti4132
@himanshuupreti4132 6 жыл бұрын
where is 7.4
@JavaAll754
@JavaAll754 4 жыл бұрын
Why functional interfaces introduced
@user-rf5db7zm4h
@user-rf5db7zm4h 2 жыл бұрын
macam mana nak buat?
@kousikup23
@kousikup23 4 жыл бұрын
Hi Naveen, I have one doubt it's trouble my mind Could you please provide answer my question may be it is silly Still please Why we need functional interface???
@rajeevsingh5453
@rajeevsingh5453 4 жыл бұрын
Imao just google it..
@dipayandas5637
@dipayandas5637 6 жыл бұрын
Can we use it with abstract class
@teluskosupport1
@teluskosupport1 Жыл бұрын
interface A{ void Help(); } abstract class B implements A{ public abstract void keep(); } public class InterfaceImplementByAbstract extends B{ @Override public void Help() { // TODO Auto-generated method stub } @Override public void keep() { // TODO Auto-generated method stub } public static void main(String []args) { } } yes
@codediva007
@codediva007 4 жыл бұрын
Sir, where to get code/ java files of your videos? If you share your repo location, it would be really helpful to many.
@divyadubey6425
@divyadubey6425 4 жыл бұрын
It is an interface why didnt we use implements keyword here
@prakkash967
@prakkash967 4 жыл бұрын
In Interface, Implements keyword must be used only when we have to extend something from the parent interface to the child interface...Here, in this video there is only one interface in the program. So there is no way to use implement keyword here... And even when we create an another interface and make that interface to implement from the above interface. The child interface's only job is to override the parent interface... Instead we can create an anonymous class and do the same job to make the code more efficient.. Guess!!! I'm right with the explanation.
@vikassemwal1947
@vikassemwal1947 4 жыл бұрын
Can you please explain, Why we need functional interface...?
@sumanthchatra8242
@sumanthchatra8242 4 жыл бұрын
We don't need functional interface... If a interface has just one method in it, we simply call it as functional interface..That's it
@teluskosupport1
@teluskosupport1 Жыл бұрын
Functional Interfaces are mainly used in Lambda expressions, Method reference and constructor references. In functional programming, code can be treated as data. For this purpose Lambda expressions are introduced. They can be used to pass a block of code to another method or object.
@Gorky25
@Gorky25 3 жыл бұрын
When is good to use a Functional interface?
@teluskosupport1
@teluskosupport1 Жыл бұрын
it is sake for programmer, if you want you method definition only upto to particular class . then use functional interface concept.
@amitkabi
@amitkabi 5 жыл бұрын
interface Xyz { void show(); } public class LambdaExpr { public static void main(String[] args) { Xyz obj=()->System.out.println("yes"); //I think program is right but Doesn't run in this line error shows obj.show(); } }
@tomwittmann6406
@tomwittmann6406 4 жыл бұрын
Maybe try putting brackets around the sout statement?
@devigeorge9133
@devigeorge9133 3 жыл бұрын
why single abstract method in functional interface in java8
@teluskosupport1
@teluskosupport1 Жыл бұрын
for sake of programmer to use anywher easily.
@parijatsharma4495
@parijatsharma4495 3 жыл бұрын
so we can't use lambda in multi method interface
@teluskosupport1
@teluskosupport1 Жыл бұрын
yes
@ArkoSarkar1
@ArkoSarkar1 6 жыл бұрын
If Abc is an interface, then isn't new Abc() creating it's object, which an interface cannot do?
@mohammedharoon1167
@mohammedharoon1167 Жыл бұрын
The object is not created there Instead it is an syntax of Java we call it an annonymous inner class we can implement the method in an easy way rather than first creating class which implements An interface than creating an object for it and using it
@teluskosupport1
@teluskosupport1 Жыл бұрын
if Abc is an interface you cannot create object of Abc . but you can implement Abc and create reference variable of Abc type
@teluskosupport1
@teluskosupport1 Жыл бұрын
if Abc is an interface you cannot create object of Abc . but you can implement Abc and create reference variable of Abc type
@amanvikram04
@amanvikram04 2 жыл бұрын
where is the functional interface explanation ? i think its not full explanation.
@bissallahekele5320
@bissallahekele5320 3 жыл бұрын
when do I open my eyes? :)
@themodestai9603
@themodestai9603 3 жыл бұрын
😂🤣
@sanskarigamer7089
@sanskarigamer7089 4 жыл бұрын
Similar to arrow function which is in JavaScript
@teluskosupport1
@teluskosupport1 Жыл бұрын
yes it is most similar to javascript arrow function. and in java it is known as lambda expression or functional interface.
@MadForCs16
@MadForCs16 3 жыл бұрын
You didn't ask me to open up my eyes and the video ended :(
@mysocial
@mysocial 3 жыл бұрын
Checked the playback speed, its 1x
@akashreddyallam8536
@akashreddyallam8536 3 жыл бұрын
You did not mention to open our eyes.
@antonyaj8446
@antonyaj8446 3 жыл бұрын
Consumer is functional interface with two methods but one method is default method
@teluskosupport1
@teluskosupport1 Жыл бұрын
yes this is allowed ... here we define body of default method and hence it work like same.
@dinkarinjosh
@dinkarinjosh 4 жыл бұрын
Really difficult to understand after 3:35, especially with eyes closed.
@karankaul7389
@karankaul7389 4 жыл бұрын
kya pyar se samjhae ho sir
@nikhilsurireddy4618
@nikhilsurireddy4618 6 жыл бұрын
mr. navin reddy... mine ramireddy.. java n hadoop trainer...u r marker interface explanation is WRONG.. kindly chk once again
@anb4351
@anb4351 2 жыл бұрын
isn't boilerplate code sometimes better for readability
@teluskosupport1
@teluskosupport1 Жыл бұрын
it is not better for everyone in term of readibilty. But it is easy to use if you know.
@yravi37
@yravi37 2 жыл бұрын
Why confusing others
#7.6 Java Tutorial | Default method in Interface
5:38
Telusko
Рет қаралды 72 М.
Functional Interface | Lambda Expression in Java
13:56
Telusko
Рет қаралды 142 М.
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 33 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 195 МЛН
#7.1 Java Tutorial | Interface | Why and What?
7:14
Telusko
Рет қаралды 142 М.
What are Delegates? (C# Basics, Lambda, Action, Func)
18:39
Code Monkey
Рет қаралды 287 М.
Java Interfaces Tutorial
15:42
Programming with Mosh
Рет қаралды 72 М.
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 722 М.
Stream API in Java
26:04
Telusko
Рет қаралды 297 М.
Java 8 Streams | map () & flatMap() Example | JavaTechie
15:37
Java Techie
Рет қаралды 210 М.
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 6 МЛН
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,5 МЛН
Проверил, как вам?
0:58
Коннор
Рет қаралды 147 М.
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 10 МЛН
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 2,2 МЛН