#7.1 Java Tutorial | Interface | Why and What?

  Рет қаралды 142,858

Telusko

Telusko

Күн бұрын

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

Пікірлер: 74
@anushreevirtualgaming226
@anushreevirtualgaming226 2 жыл бұрын
1. Whenever you inherit a abstract class , we use extend keyword while inheriting a interface class , we use implement keyword 2. Like abstract class we cannot create the object of interface classes , but we can create reference of them 3. To achieve multiple inheritance we can implement as many interface classes as we want, but normal or abstract class can be inherited only once. 4.Methods of interface are by default public abstract , so we cannot define their bodies 5.Use abstract if u want to declare methods , otherwise always go for interfaces in the long run😉
@weihenglu691
@weihenglu691 5 жыл бұрын
Saw some people said this is a complex example, but to me it is the first time I understand why we should use interface and abstract class, well done!
@RezaJafari1984
@RezaJafari1984 4 жыл бұрын
Finally I understand what interface do. Thank you. You are a great teacher.
@monome3038
@monome3038 5 жыл бұрын
this is one of the best java tutorials on the internet, thank you!
@nero1563
@nero1563 5 жыл бұрын
After a long time I understood the concept of interface. Thank you!!!!
@jasoncastaldo2823
@jasoncastaldo2823 5 жыл бұрын
I thought this was a great explanation, but a little too fast. No problem, set the speed to .75.
@user-tu7rh2hr1n
@user-tu7rh2hr1n 2 жыл бұрын
This is the best video on this topic. NO video, no articles, nothing can match this video. Thankyou.
@kiranforcoding
@kiranforcoding 3 жыл бұрын
I love this man because of below points . 1. Video is short 2. Sticks to the point 3. No unnecessary talk 4. Explaining problems then the solution
@unaisulhadi9102
@unaisulhadi9102 3 жыл бұрын
Best example for Interface, I've been searching the right video to understand Interfaces, this is the best..!
@guru_bro
@guru_bro 3 жыл бұрын
Thank you so much. I was having trouble to understand the use of assigning super class reference variable to sub class reference variable for months. I left that for later and went ahead to abstract and interface. I'm so happy it got cleared while studying interface In this video. God bless u.
@mertoz8899
@mertoz8899 5 жыл бұрын
thanks a lot, navin, this concept is now more clear in my mind.
@sanjaydhande6573
@sanjaydhande6573 5 жыл бұрын
Very good explanation of abstract and interface and the difference of both , and how to use, the purpose is now clear.
@mdasadahmed2769
@mdasadahmed2769 6 жыл бұрын
There is no language to say you sir Thank You I can't express my feelings sir , thank you very much
@dhananjaypanage2472
@dhananjaypanage2472 5 жыл бұрын
It is really to understand! Thank you sire! I am grateful to you
@kehinde10100
@kehinde10100 5 жыл бұрын
could not understand interface unlike the rest of your videos. But thanks all the same sir...
@prathmeshmayekar5454
@prathmeshmayekar5454 4 жыл бұрын
You pass class object in function arguments, i had no idea we could do that because I'm beginner and also you didn't teach that in previous videos 😅 I got so confused and had to learn it from Google
@LazizbekYusupov92
@LazizbekYusupov92 2 жыл бұрын
Yeah, similar shit! Never even could imagine that. Probably it is from super advanced level courses.
@anakin0405
@anakin0405 4 жыл бұрын
since Java 1.8 we can have default and static methods in interfaces. It is not mandatory to implement them into your class that implements that interface, but only the abstract (declared methods) like before. Default and static methods have been implemented into interfaces due to Stream API. But a better question Navin: why do we use abstract classes instead of interfaces? Can you provide with an example? I haven't seen anyone using abstract class instead of interface.
@madhushreekulkarni9866
@madhushreekulkarni9866 3 жыл бұрын
Best tutorial online.
@ntigirishari
@ntigirishari 5 жыл бұрын
Thank you so much, sir!!
@trinathchejarla9497
@trinathchejarla9497 6 жыл бұрын
thanks you naveen garu............
@YousifShafee
@YousifShafee 6 жыл бұрын
Very useful video , , , thx Very much
@tufanatha7798
@tufanatha7798 4 жыл бұрын
Hi Sir, I have one question, is this possible to control a class to access only required methods of an Interface A, A is having test1 and test2 methods, Class B implements A, now I want B can access only test2. Is it possible? (in java 1.7 or 1.8)
@thestarinthesky_
@thestarinthesky_ 5 жыл бұрын
I really enjoyed watching this video! I have learned a lot ! I love programming! Thank you so much
@WiJo1987
@WiJo1987 4 жыл бұрын
Thanks a lot for this!!
@chinmaydas4053
@chinmaydas4053 6 жыл бұрын
you are great sir..
@pavanvemuri6352
@pavanvemuri6352 6 жыл бұрын
Sir can you please make tutorials on how to integrate payu payment gateway into android app with the code explanation......
@elangovann1549
@elangovann1549 3 жыл бұрын
Excellent Explanation
@anima651
@anima651 4 жыл бұрын
But in the interface we can only declare and we are not defining methods so my question is what is the use of interface if you are going to declare the methods in the derived class. Why do we need to create an interface only to define?
@puchusahoo3552
@puchusahoo3552 5 жыл бұрын
I dont understand this example.
@mananchawla9324
@mananchawla9324 3 жыл бұрын
If the pen, pencil extends a class ABC and implements Writer how will we be able to use methods defined in ABC class. I tried it but it gives an error.
@tobyccw
@tobyccw 2 жыл бұрын
i understand the use of interface in "Within" own code(the pen, kit, the writer all under your control), but i don't understand why we use Interface provided by others library (what is the point of using their Interface if I still need to write my own method? )
@mohitgupta21
@mohitgupta21 6 жыл бұрын
which assignment are you talking about sir??
@MirceaBene
@MirceaBene 3 жыл бұрын
Thank you!!!!
@arpityadav2268
@arpityadav2268 4 жыл бұрын
Sir at 0:42 you said that "I have told you to do the assignment of this , right !" But where are the assignments ? Please tell me.
@rahul208in
@rahul208in 4 жыл бұрын
Nicezzz....do u teach java based on users current experience?
@_Sumitra_
@_Sumitra_ 6 жыл бұрын
Thank u sir.
@amanthakur6913
@amanthakur6913 4 жыл бұрын
your videos are very short and informative
@ArkoSarkar1
@ArkoSarkar1 6 жыл бұрын
The p ref variable in main() and passed in doSomething(), they both are different? Because if same, then it should stick with p only and not pc, if different then the doSomething() p is just a parameter getting replaced by main()'s p or pc depending on which is called.. This is what I understood from that, someone please correct if wrong!
@prathmeshmayekar5454
@prathmeshmayekar5454 4 жыл бұрын
I also got confused there
@elumalaim6857
@elumalaim6857 4 жыл бұрын
someone pls tell me the version of this eclipse ide
@rahulgoti3864
@rahulgoti3864 6 жыл бұрын
Thank You
@ffx178
@ffx178 5 жыл бұрын
Love your video respect from Pakistan i have an interview tomorrow wish me luck :)
@aj-ql2kf
@aj-ql2kf 4 жыл бұрын
Bad luck
@sonyscaria7333
@sonyscaria7333 4 жыл бұрын
We can define static and default methods in interfaces (JAVA 8)
@teluskosupport1
@teluskosupport1 Жыл бұрын
yes you can define static , private , default method in interface
@KP-hz5wm
@KP-hz5wm 3 жыл бұрын
Where is why?
@satyamraut333
@satyamraut333 4 жыл бұрын
2:42 Sir why we are creating reference of Writer class ....becoz we know that by creating reference of its child classes(pen and pencil) code is working properly.
@prathmeshmayekar5454
@prathmeshmayekar5454 4 жыл бұрын
Your point is right, i also got confused on the same
@keerthivasan3026
@keerthivasan3026 Жыл бұрын
what is the use of to create the reference
@sp123447
@sp123447 Жыл бұрын
if you create reference of child classes then objects will be created but it cannot be passed into dosomething function as it only takes pencil object. But if you create with Writer reference and pass the Writer argument instead of pencil or pen object argument to doSomething method then the output will be given depending on pen or pencil. This way you can avoid creating one more method that accepts pen object. Also this will be very helpful when creating more use cases. Such as crayon, sketch and more. The base will be the same only the print statement will change as per what is passed. Hope i answered your question
@jordanaugust1207
@jordanaugust1207 3 жыл бұрын
this is some dank
@tejaswibane5015
@tejaswibane5015 4 жыл бұрын
Good
@prakashsubramanian4671
@prakashsubramanian4671 5 жыл бұрын
Tanq bro
@zayb007
@zayb007 2 жыл бұрын
Explication is good but it's too fast but non technical students can't to catch so please explain slowly
@viswamanohar7584
@viswamanohar7584 5 жыл бұрын
not able to understand this example
@bingibalajireddy
@bingibalajireddy 6 жыл бұрын
I love you.. Ha ha ha
@AshishKumar-nq8fv
@AshishKumar-nq8fv 4 жыл бұрын
Can I make a object of abstract class?
@elisadevid5660
@elisadevid5660 3 жыл бұрын
No
@teluskosupport1
@teluskosupport1 Жыл бұрын
you need to make object of abstract class to use abstract method but when you use final with a class you cannot make object of this final class . therefore we cannot use final and abstract simultaneously.
@aryangupta7414
@aryangupta7414 5 жыл бұрын
maybe for some one who knows what interference it is easy to understand you example but for a normal guy you only showed how to make an easy example tough
@NuanDaa
@NuanDaa 2 жыл бұрын
I'm still confuse I think I am stupid lol
@avinashshejval4115
@avinashshejval4115 6 жыл бұрын
I am 1st
@thestarinthesky_
@thestarinthesky_ 4 жыл бұрын
You should consider teaching at Harvard 🙄You are the best the best the best ever. This is the fourth time I have watched this video and it never gets OLD. I got amazed more than before. You are incredible in a way how you reach to a point to introduce and teach the use of interface in this video. I love thie channel❤️❤️❤️❤️❤️please keep this channel alive. More than before
@abhishekrajkumar4880
@abhishekrajkumar4880 4 жыл бұрын
Totally agree with you!
@vinayakdasari
@vinayakdasari 4 жыл бұрын
speed 0.75
@MrSdwsds
@MrSdwsds 3 жыл бұрын
Too fast otherwise its good
@shubhamshukla7645
@shubhamshukla7645 4 жыл бұрын
you have 69 videos in course series, nice!
@manikumarvecha6824
@manikumarvecha6824 5 жыл бұрын
very fast
@dipakraut6058
@dipakraut6058 5 жыл бұрын
please teach slowly.
@MrSdwsds
@MrSdwsds 3 жыл бұрын
Too fast
@anjalitrivedi8331
@anjalitrivedi8331 4 жыл бұрын
So much confusion
@funnykid2176
@funnykid2176 4 жыл бұрын
Worst explanation I did not understand any thing
@renify_
@renify_ 5 жыл бұрын
bad example
#7.2 Java Tutorial | Interface | More about Interface
5:26
#7.6 Java Tutorial | Default method in Interface
5:38
Telusko
Рет қаралды 72 М.
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 45 МЛН
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 13 МЛН
Scary Teacher 3D Nick Troll Squid Game in Brush Teeth White or Black Challenge #shorts
00:47
#6.7 Java Tutorial | Wrapper class | AutoBoxing
8:35
Telusko
Рет қаралды 114 М.
#6.2 Java Tutorial | Super Method
6:47
Telusko
Рет қаралды 163 М.
#4.6 Java Tutorial | Static Keyword
12:20
Telusko
Рет қаралды 449 М.
#6.4 Java Tutorial | Method Overriding | Super Keyword
4:59
Telusko
Рет қаралды 213 М.
#65 Need of Interface in Java
8:32
Telusko
Рет қаралды 113 М.
Java Interfaces Explained - 040
7:12
Deege
Рет қаралды 155 М.
#6.6 Java Tutorial | Encapsulation
6:21
Telusko
Рет қаралды 301 М.
#7.8 Java Tutorial | Static method in Interface
3:07
Telusko
Рет қаралды 44 М.
Difference between Interface and Absract Class
16:57
DURGA EDUCATION
Рет қаралды 960 М.
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 3,2 МЛН