Yes we can do overloading with different classes as well. But that's a kind of very unlikely process. According to Oracle docs, If two methods of a class (whether both declared in the same class, or both inherited by a class, or one declared and one inherited) have the same name but signatures that are not override-equivalent, then the method name is said to be overloaded. It doesn't need any relationship in between them. Thanks for pointing out. Will pin this comment. 😊
Bro I learnt java already aana marandu pochu Enakku selenium naa enna nu kuuda theriyaadu Chumma random aa than onn video pathen And veera lvl aa iruku 😊 Adum onga xmpl lam chance ee illa Aana playlist ku java for selenium aa mathina nalla reach kadaikum Keep it up..! Super 😗 naa By the by Naa CSE 2nd er.. Class laa mass kataporen java laa😝😜
Bro can you clarify Overriding concepts for Static Methods? 1) Can Static Methods be Overridden? 2) Can we have 2 Static methods with same signature in both Parent and Child class? 3) If we have 2 Static methods with same signature in both Parent & Child Class, what will be the output when we call those methods by creating object (I understand Objects shouldn't be created for Static methods, but still compile time it only gives warning and allows to run code) Let's say we have static test method in both Parent and Child Class Parent obj1 = new Parent() ; Parent obj2 = new Child(); Child obj3 = new Child(); obj1.test; obj2.test; obj3.test; (this is allowing to override Static method of Parent)
panlam but we have already created method in the parent class so we are making use of the same methods for the child also. multiple times child pandrathukum parent kita irunthu vangikrathum difference iruku ilaya. thats what implement here
You can do. Like a method is getting String name as parameter, you can use, Customer customer, Student student. Can be sent. The type is that class here
inside a package only we create multiple classes. for example take a school(say it as package) in that school many students will be studying but not in the same class correct so we are having classes inside the school(package).
Sir i need projects to update in resume and also need practise so help me sir because i was in bpo sector but learned and finished course java with selenium
Its already there in the video, anyways here is one. Assume that you are building a merging application. If u give two pdf files.it will merge them, if u give two audio or video files it will.merge them. U don't feel like using two different method names like mergepdf and mergeaudio or merge video. In that case polymorphism comes in handy. If the input type is pdf perform the one which is receiving pdf file as a parameter and if it's an audio file call the method which is using audio type as paramater. It's all about the design requirement for the application u build. Nothing strict or constant it should be like this. If u need something like this, u can make use of this, that's the point in all the programming languages
Brother I have a doubt in this video - overriding example while giving parameters to method, here we declared class as parameters what does styleOfTalking parameter represent?? I tried only using created class name but i am facing error.
@@LearnAutomationOnline when we give the float add(float n1, float n2) {
return n1+n2; } //created object for addition class Addition adding = new Addition(); and then when we use System.out.println(adding.add(4.6, 7.7); when we run it even though we have an error we get Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method add(int, int) in the type Addition is not applicable for the arguments (double, double) at com.loa.polymorphism.Addition.main(Addition.java:30)
1.Is it possible to create all the 4 below objects in child class,If not please explain why ? 1.Parent parent = new parent (); 2.Parent parent = new child (); 3 Child child = new child (); 4.Child child = new parent ();
@@LearnAutomationOnline Learn Automation Online Can you please explain d difference btwn the first 3,When we need to use wch,For ex: Why we need to use parent object referencing parent class in child class
If you watch the abstraction video, you will have a better idea on why we are using dynamic polymorphism ( parent p = new child). When we are going for abstraction, this will be useful. Parent class mostly it will be remaining as abstract one, it will generally give specifications. So we won't have the need to create objects for parent class. As I said, please watch abstraction video. So you will have a better understanding of this comment.
Hi Bro, Question at 14:51... I think, overload is also possible in IS-A relationship. Please correct me if I am wrong...
Yes we can do overloading with different classes as well. But that's a kind of very unlikely process. According to Oracle docs, If two methods of a class (whether both declared in the same class, or both inherited by a class, or one declared and one inherited) have the same name but signatures that are not override-equivalent, then the method name is said to be overloaded. It doesn't need any relationship in between them. Thanks for pointing out. Will pin this comment. 😊
Nothing personal.. strictly bussines💥💥💥 Godfather vibes
Dear Brother, unga video and neenga thara examples super.
Super Explanation brother.Nalla Puriyuthu Thanks
Bro
I learnt java already aana marandu pochu
Enakku selenium naa enna nu kuuda theriyaadu
Chumma random aa than onn video pathen
And veera lvl aa iruku 😊
Adum onga xmpl lam chance ee illa
Aana playlist ku java for selenium aa mathina nalla reach kadaikum
Keep it up..!
Super 😗 naa
By the by Naa CSE 2nd er..
Class laa mass kataporen java laa😝😜
Glad u found it useful. Rock your class also, teach your class. In that way you can rock even more!
@@LearnAutomationOnline 🔥Nandrigal palaaa!
thoroughly explained
good teaching bro....thank you for your Teaching
bro vera levell teach......to do more videos updates also
Terrific !! Worth listening.
super anna. ur examples are very understandable anna. Rocking bro.
bro examples are very good....Good work bro ..keep it up ...
Well teaching sir
Bro parameters la error kamikudhu bro solution please
please one more clarify to throw in overloading and overriding difference
Anna... kindly explain me, what is an exception??? which you mentioned in the Aspect tabular column
I have one doubt why we add second parameter for all the methods as styleoftalking, what is the need for it,
Run time la than therium nu epdi solringa already new implementation child class la irukuna athuthana varum ??? Confused ah iruku bro pls explain
Return type over Loading la change agalama
Mass thala
Semma...ji
Awsome
Thanks lot anna 👍
Sir...Please send me a link for java concepts
I have completed studying basic concepts in JAVA, can you please share RUclips video for maven, Selenium & testng
Check the Playlist tab of the channel. You can see all the videos clubbed under different Playlist
While using overloading concept need to create all the classes for dummy then only we can do overload?
Bro can you clarify Overriding concepts for Static Methods?
1) Can Static Methods be Overridden?
2) Can we have 2 Static methods with same signature in both Parent and Child class?
3) If we have 2 Static methods with same signature in both Parent & Child Class, what will be the output when we call those methods by creating object (I understand Objects shouldn't be created for Static methods, but still compile time it only gives warning and allows to run code)
Let's say we have static test method in both Parent and Child Class
Parent obj1 = new Parent() ;
Parent obj2 = new Child();
Child obj3 = new Child();
obj1.test;
obj2.test;
obj3.test; (this is allowing to override Static method of Parent)
did you get a chance to look into this bro?
Static method cannot be overridden..in the compile time itself error will be thrown
use static way it's possible to override in child class don't create instance or object directly call the method in static way...
Super Anna
Bro override la child class ke object creat panalame... why we use parent class to create object... what is the different between the above two
panlam but we have already created method in the parent class so we are making use of the same methods for the child also. multiple times child pandrathukum parent kita irunthu vangikrathum difference iruku ilaya. thats what implement here
ethuku bro overload dataType Parents ku thaniya class create pandrom...apdi pannallana error varruthu ... arul bro illaa yaru therinnjaalum pllzz ans me
konjam question ah clear ah solunga and neenga ena example type paningalo paste it here
@@meenavinothviyanmivan actually now cleared sis. . Actually antha sec la na avar solratha olunga ketkama vituten
@@nantha7128 no issues
@@meenavinothviyanmivan parameterize la class also use pannalamnu sonnatha na gavanikala. . So en frd ku video share pannen. Avan clear pannan. .
Gud noon Sir...I need a Java Concepts video alone can u send a link.
Check the playlist tab in my Channel
Can we able to create object for parameters?
Objects for parameters? Objects are for classes.
Bro...method la parameter datatypes like int,float instead of can we use different classes?
Built in classes or user defined ones?
@@LearnAutomationOnline user defined bro
You can do. Like a method is getting String name as parameter, you can use, Customer customer, Student student. Can be sent. The type is that class here
Hello bro iam going to shift my profession. Iam a mech engg.
I can understand the overloading concept, but where we will apply or use this
neraya method name use panna ungalala remember panna mudiyathu thats why
Hi Bro, can Static Methods be Overriden in Child Class ? I think this point needs to be added in the notes ...
no static method cant be overriden because ,only instance method can be overriden because static method cant hold instance variable or method
Sir package nan ena ??
inside a package only we create multiple classes. for example take a school(say it as package) in that school many students will be studying but not in the same class correct so we are having classes inside the school(package).
Hi Brother,
Also Another point is - Static method cannot be overridden.
Thanks
your point is wrong static method also able to override. you can use in static way...
in child class don't create instance or object directly call the method in static way...
unmaiya irunthalum nanga sothula pangukku varamatom, summa sollunga
👍👏👌
Sir i need projects to update in resume and also need practise so help me sir because i was in bpo sector but learned and finished course java with selenium
You can take up the demo websites I used in the videos like orange hrm or similar sites and automate them. Add it to your resume.
@Learn Automation Online... can you please why,where and when we using polymorphism please explain...
Its already there in the video, anyways here is one. Assume that you are building a merging application. If u give two pdf files.it will merge them, if u give two audio or video files it will.merge them. U don't feel like using two different method names like mergepdf and mergeaudio or merge video. In that case polymorphism comes in handy. If the input type is pdf perform the one which is receiving pdf file as a parameter and if it's an audio file call the method which is using audio type as paramater. It's all about the design requirement for the application u build. Nothing strict or constant it should be like this. If u need something like this, u can make use of this, that's the point in all the programming languages
@@LearnAutomationOnline Thank you soo much sir, Now only i understand and this explanation will really helpful for my interview
One question?... runtime polymorphism can achieved data member..? Please explain this answer
Brother I have a doubt in this video - overriding example while giving parameters to method, here we declared class as parameters what does styleOfTalking parameter represent??
I tried only using created class name but i am facing error.
Hi Bro, at 13.52
double add(double n1, double n2) {
return n1+n2;
}
float use panna error show pannudhu bro.
What error?
@@LearnAutomationOnline when we give the
float add(float n1, float n2) {
return n1+n2;
}
//created object for addition class
Addition adding = new Addition();
and then when we use System.out.println(adding.add(4.6, 7.7);
when we run it even though we have an error we get
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method add(int, int) in the type Addition is not applicable for the arguments (double, double)
at com.loa.polymorphism.Addition.main(Addition.java:30)
so changed it to double it worked fine but wanted to know why float did not work
Style of talking ??
1.Is it possible to create all the 4 below objects in child class,If not please explain why ?
1.Parent parent = new parent ();
2.Parent parent = new child ();
3 Child child = new child ();
4.Child child = new parent ();
First three are possible. Because a parent can hold child. But the fourth is not possible, because a child can't hold its parent. Clear?
@@LearnAutomationOnline Learn Automation Online Can you please explain d difference btwn the first 3,When we need to use wch,For ex: Why we need to use parent object referencing parent class in child class
If you watch the abstraction video, you will have a better idea on why we are using dynamic polymorphism ( parent p = new child). When we are going for abstraction, this will be useful. Parent class mostly it will be remaining as abstract one, it will generally give specifications. So we won't have the need to create objects for parent class. As I said, please watch abstraction video. So you will have a better understanding of this comment.
Hi Arul Can you explain briefly about covariant return types in method overriding in Java with an example please.
@@LearnAutomationOnline I understood, Thank you!!!