Interface Concept and Multiple Inheritance In Java - Core Java - Part - 14

  Рет қаралды 125,193

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Пікірлер: 74
@pkumar2371
@pkumar2371 4 жыл бұрын
I never thought that I will learn java ever but one day my friend told about naveen automation labs and when i saw first video. that day i thought yes I also can learn java..Thanx a lot Naveen.
@prashanawali1525
@prashanawali1525 5 жыл бұрын
I wonder.. who are these five those put dislike !! Naveen you are really superb. Thank you
@rickyjindal999
@rickyjindal999 3 жыл бұрын
In java 9 we can create private method under interfaces. And in java 8 default concrete method and static methods are also available. if we are create any default method in interface in that case we must have to use the defect keyword Eg: "default void display() { -- }" Thanks naveen your videos are amazing
@shrutidabke708
@shrutidabke708 4 жыл бұрын
Naveen, you have explained Interface concept in very simple way. I have learn it now in real sence.Thanks & keep going..... :)
@minakshigulia8997
@minakshigulia8997 4 жыл бұрын
i lv your way of teaching so much ,it makes me feel like ..............m apse pdhti rhu pdhti rhu pdhti rhu.............................
@AishwaryaShinde-j8p
@AishwaryaShinde-j8p 8 ай бұрын
I never understood interface concept so clearly, Thank you Naveen !! Awesome way of explaining.
@MultiPrasad99
@MultiPrasad99 5 жыл бұрын
Nice video Naveen. Just one correction Java 8 allows to have static and default methods in interfaces
@mohmashooqdowlati7933
@mohmashooqdowlati7933 4 жыл бұрын
Outstanding Job Mr. Naveen! May God Bless You.
@sureshsubramaniyan3201
@sureshsubramaniyan3201 5 жыл бұрын
Really very useful and understood interface Concept and Multiple Inheritance. Thank you once again
@zarifjamshidi8050
@zarifjamshidi8050 4 жыл бұрын
Excellent explanation and awesome videos. thanks Mr.Naveen
@ashwinikunapareddy2773
@ashwinikunapareddy2773 4 жыл бұрын
Hi Naveen, Thank you so much for wonderful videos..
@saurabht09
@saurabht09 3 жыл бұрын
Very soon we will see 1M subscribe r for Naveen..keep going 🙏🙏
@ItsMeSimna
@ItsMeSimna 6 жыл бұрын
Thanks Naveen!!Ur videos are awesome!!
@tarekhasan8545
@tarekhasan8545 4 жыл бұрын
Hi, Sir, I absolutely finding these videos very helpful, Where i had no knowledge in Java . I was following the videos serially but got confused after 14 th video. which one should i follow after Interface concept
@ashokchandola
@ashokchandola 3 жыл бұрын
15th 😂😂 Array vs array list
@nitin.parihar820
@nitin.parihar820 3 жыл бұрын
Hi Naveen, Thanku for such clarity on every topic. Just a small request, please increase the font while writing the code in eclipse. It is somewhat difficult to get a good view. Thanks a ton.
@minanurjan5007
@minanurjan5007 6 жыл бұрын
you are amazing Naveen~!~!thank you very much, helped me a lot. you explained so much easy way to solved all my problems
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
Thanks for watching Nurjan. Keep learning.
@OptionTraderDiary
@OptionTraderDiary 5 жыл бұрын
Naveen, looks like this video has to be modified since from Java 8, Static methods are allowed in interface and there is also a new type called default for method declaration.
@MSD_Explorar
@MSD_Explorar 5 жыл бұрын
Hi Navin.. I am one of your student .. i Just love your videos and thanks a lot for that.. One small thing i noticed while practicing interface is that only variable declaration (i.e. int minBal; ) is not allowed in interface we have to initialize them (e.g int minBal = 4500). otherwise it gives "Exception in thread "main" java.lang.Error: Unresolved compilation problem: The blank final field minBal may not have been initialized"
@DebunkSensibly
@DebunkSensibly 3 жыл бұрын
Thank you Naveen. It really helped me
@mohitbansal9938
@mohitbansal9938 4 жыл бұрын
Hi Naveen, as per the video we cannot create static method in Interface but I have created a static method in interface with method body and second you said, we can't create method body, but we can create method body in Interface. Example for static method is public static void show(){ System.out.println("Static show method");} Example for a method with method body is: public default void debit(){ System.out.println("debit method");}
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
After jdk 1.8 it's allowed to create static method and default method with body. But with non static and default method, you can't give the method body.
@mohitbansal9938
@mohitbansal9938 4 жыл бұрын
@@naveenautomationlabs ook
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
kzbin.info/www/bejne/gqWWhWuVqtmNr9k refer this video
@divyaupadhyay3534
@divyaupadhyay3534 5 жыл бұрын
Hi Naveen, As you said We will not able to create main method and static method in interface.But I am able to do it.
@gigapapi
@gigapapi 3 жыл бұрын
Is there a separate video for multiple inheritance
@nazmak4194
@nazmak4194 3 жыл бұрын
Very good work sir... One doubt When we cant write static methods in interface why we need static variables(why variable are static by default and what is the use of it)??
@satyajeetkumar5464
@satyajeetkumar5464 5 жыл бұрын
Hi Naveen, please make a video on multi threading concept and synchronization in java. Or if there is a video of yours for these topics please share the link.
@justinraj3494
@justinraj3494 5 жыл бұрын
nice explanation brother ..easy to understand
@jashanpreetkaur1677
@jashanpreetkaur1677 5 жыл бұрын
Hi Naveen I have a Question here.As you mentioned in the video no static methods are allowed in the Interface.But as per my below code,i am not getting any error.Kindly answer . public interface Con { int a = 10; static void sum() { System.out.println("hey"); } }
@naveenautomationlabs
@naveenautomationlabs 5 жыл бұрын
This is allowed after jdk1.8. You can have static and default methods in interface.
@tapaskhandai
@tapaskhandai 6 жыл бұрын
Hi Naveen method overriding is run time ploymorphism
@niranjanpatil2504
@niranjanpatil2504 2 жыл бұрын
Hi Sir, as per my understanding inheritance is called is-a relationship and interface is has-a relationship.
@chiragbansod4003
@chiragbansod4003 3 жыл бұрын
I think there is slight confusion here … Inheritance means Is-A relationship and aggregation means Has-a relationship
@Tamizh144
@Tamizh144 2 жыл бұрын
I have a doubt if we have same name interface method like debit() this will available in both USbank and Uk bank but those bank have different properties.on that time how can we define method body in testbank class.
@deepakrevankar1717
@deepakrevankar1717 3 жыл бұрын
Sir what is the significance about minbal variable ? as per minimum balance set by US bank it should be 100. but in child class can alter it to lower
@johnrussel7271
@johnrussel7271 4 жыл бұрын
In static and non- static video you mentioned like a static variable can be called directly by the variable name or by class name dot variable but in this case why we are not able to call the variable directly even its though its static in nature
@michaelgathogo7878
@michaelgathogo7878 6 жыл бұрын
Is multiple inheritance possible in java or did you mean multiple level inheritance? what is different between multi-level inheritance and multiple inheritance?
@dillikumar7074
@dillikumar7074 6 жыл бұрын
multilevel inheritance can be acheived by inheritance ,.....multiple inheritence can be acheived by interfaces in java.... differnce b/n multilevel and multiple is .... multi-level inheritance : suppose A is the super class ,A has a child named B, and B also have child called C, A(grand father)--->B(father)---> C (child) ---> multilevel inheritence each child has only one parent. multiple-inheritance : Here single child can have more than one parent .....
@WhiteKnight_OG
@WhiteKnight_OG 7 ай бұрын
Thank you Sir
@anamicasingh6837
@anamicasingh6837 3 жыл бұрын
Just one small doubt.. Can 2 different Interface have same method . If yes, how can we call them in single class.
@naveenautomationlabs
@naveenautomationlabs 3 жыл бұрын
you can have same methods in 2 diff interfaces. But you need to override only once in child class and write buss logic accordingly.
@anamicasingh6837
@anamicasingh6837 3 жыл бұрын
@@naveenautomationlabs Thank you so much... Your videos are really really helpful.
@chethanasurpur9866
@chethanasurpur9866 6 жыл бұрын
Hi Naveen, I am a little confused. If we can create an object of any class anywhere as long as the class is public, then why do we need inheritance coz you can only inherit public classes. Please explain this part.
@dillikumar7074
@dillikumar7074 6 жыл бұрын
Hai,suppose if they are 10 ten classes with public , you need to create object for 10 classes right ? to acces that class methods, unnecessarily wasting of memory right? if we inherite only one time object creation is enough right? I guess it is correct assumption, if wrong plz correct me.
@RaviKumar-hz8cf
@RaviKumar-hz8cf 7 жыл бұрын
well explained
@sanjupole1491
@sanjupole1491 4 жыл бұрын
What if, if both the interface has same method then which method would get implemented
@tejastoley6714
@tejastoley6714 5 жыл бұрын
we can define static method in parent interface but we can access that method by using only Interface name.
@AdityaSingh-wy7xe
@AdityaSingh-wy7xe 5 жыл бұрын
Can you please make a pictorial memory representation with properly stating the memory names, I am bit confused regarding the memory representation of the following: --USBank b=new HSBCBank()
@ramyabaskaran8859
@ramyabaskaran8859 6 жыл бұрын
Thank u naveen
@CodeAutomateHub
@CodeAutomateHub 3 жыл бұрын
hi naveen what to do when two interface have same methods and same signature the test class calls which method????
@naveenautomationlabs
@naveenautomationlabs 3 жыл бұрын
Child class will implement only one method and test class will call that method.
@CodeAutomateHub
@CodeAutomateHub 3 жыл бұрын
@@naveenautomationlabs so which method will be implemented interface 1 or interface2??
@CodeAutomateHub
@CodeAutomateHub 3 жыл бұрын
oh understood @Naveen AutomationLabs i just implemented it practically
@bhavanagyarampalli8983
@bhavanagyarampalli8983 2 жыл бұрын
Thank a lat sir
@sridhar2127
@sridhar2127 7 жыл бұрын
Hi Naveen, I have a small doubt in calling a static variable in this video. In your earlier video, you said there are two ways to call a static variable 1. Calling directly 2. Calling with ClassName.variable In this time - kzbin.info/www/bejne/l5mToaFuZq6Xerc But here why it not accepting when we call it directly
@praveen420ify
@praveen420ify 6 жыл бұрын
because min_bal is not part of same class. U can call direcly when variable is part of same class.
@kgip11
@kgip11 3 жыл бұрын
If static methods not allowed in Interface then how come variables are allowed?
@prafullmanjare7291
@prafullmanjare7291 4 жыл бұрын
Naveen please put this code link in Description So that easy to download Thank you
@chnagireddy3792
@chnagireddy3792 3 жыл бұрын
What if two interfaces we are implementing have same methods.
@hemasahoo4908
@hemasahoo4908 5 жыл бұрын
sir mutualfund s.o.p statement is not printing
@gangadharareddy
@gangadharareddy 5 жыл бұрын
You should create object in TestBank. BrazilBank bb = new HSBCBank(); Then try bb. U will get mutual fund()
@jerinthomas3283
@jerinthomas3283 4 жыл бұрын
How the mutual fund run in main method?
@vijayapriyapalanikumar6213
@vijayapriyapalanikumar6213 5 жыл бұрын
I have one doubt, what happen if us bank and uk bank have same method name For ex: credit method of uk bank Credit method of us Bank
@dilpudara777
@dilpudara777 5 жыл бұрын
It docent matter. because normally you create object from interface call the method. you can call what ever the method you want.
@vhvl3888
@vhvl3888 5 жыл бұрын
i always watch your videos at 1.5 speed rate
@naveenautomationlabs
@naveenautomationlabs 5 жыл бұрын
Why?
@vhvl3888
@vhvl3888 5 жыл бұрын
@@naveenautomationlabs it actually helps in noticing concept and gets finish in half of the time moreover if i neeed to slow i can always pause and rewind.
@swapnilbodade1336
@swapnilbodade1336 5 жыл бұрын
yes thats best way to revise. he has crystal clear explanation, no redudent talk
@happylife8943
@happylife8943 5 жыл бұрын
java 8 allows static methods in interface
@arabindamohanty2190
@arabindamohanty2190 3 жыл бұрын
but I am able to create main method inside an interface
@ramyab6961
@ramyab6961 6 жыл бұрын
can we declare the same method for different Interface?
@RaviKumar-hz8cf
@RaviKumar-hz8cf 7 жыл бұрын
make video of abstract class also
ArrayList vs HashTable In Java - Core Java - Part - 15
28:15
Naveen AutomationLabs
Рет қаралды 87 М.
Method Overriding, Inheritance and Polymorphism  in Java - Core Java - Part -13
34:01
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 138 МЛН
Муж внезапно вернулся домой @Oscar_elteacher
00:43
История одного вокалиста
Рет қаралды 7 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 38 МЛН
Молодой боец приземлил легенду!
01:02
МИНУС БАЛЛ
Рет қаралды 2,2 МЛН
OOP 5 | Abstract Classes, Interfaces, Annotations
1:10:42
Kunal Kushwaha
Рет қаралды 259 М.
Difference between Interface and Absract Class
30:52
Naveen AutomationLabs
Рет қаралды 182 М.
The Biggest Mistake Beginners Make When Buying An Audio Interface
5:31
Audio University
Рет қаралды 925 М.
Java's Creators Rejected Multiple Inheritance - Here's Why
13:14
Coding with John
Рет қаралды 70 М.
What is Encapsulation in Java - OOP Concept
19:44
Naveen AutomationLabs
Рет қаралды 72 М.
final vs finally vs finalize in Java
29:21
Naveen AutomationLabs
Рет қаралды 111 М.
Coding Was Hard Until I Learned THESE 5 Things!
7:40
Pooja Dutt
Рет қаралды 1,1 МЛН
#66 Need of Interface in Java
8:32
Telusko
Рет қаралды 150 М.
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 138 МЛН