Sir mujhe ek doubt hai , mene dekha ki yahan abstract method ek template ki tarah work kar raha hai and baki another Child class us template ko use karke apna apna behaviour show kar rahe hai to sir ye to method overriding ki tarah hi hua na kyu method overriding me bhi same method name hota tha but uska behaviour sabhi child class apni requirements ko dekh kar define karte the . To sir mujhe ek doubt hai ki method overriding and abstract method me kya difference hai ?
yaha per hum animal class ka(parent class) ka referance variable bana ke bhi subl classes ko call ker sakte hai kya... ?🤔👇 animal r = new Dog(); animal l = new Lion();
In this Abstraction program ,there is inheritance fine, but there is also polymorphism MEDHOD OVERRIDING [ public void sound ( ) ] and ur still saying its abstract ???
Bro your all videos are useful nd u are a good youtuber..but your voice is gruff so you should your voice bold then I'll understand very well..nd thanks for reaching us..
I wonder why to use abstract Look we only create method in parent class and in child class(dog & lion) we even create method and write code and call method in main class. But we can do this without parent class eg. We need to create 2 class (dog & lion) and inside it we can create method eat() and call it in main class . So why to use abstraction?
you are thinking like a C programmer . You are forgetting that java follows OOP paradigm . To maintain the relationship between a generic animal with its different instances is basically an act of inheritance. With your logic why is inheritance even exists then??. Think like a real -life world problem . And don't deviate from OOP. Like we Humans Belong to Animal class which is the super Class of Animal Kingdom . After that animals gets sub divided into mammals, Amphibians, Reptiles, Avians, fish and invertebrates. This abstract class of animal kingdom doesn't have enough characteristics to differentiate each animal . It may have basic info like, an Animal will eat food, it will have legs etc. but it can't give characteristic like colour , no. of legs , life expectancy. The use of abstract class is to make a standard genaralized characteristic which every animal must follow. This analogy is very important in terms of software development and even with game development.
@@DreamDropsTV you mean Animal have the characteristics of eating, walking but it cannot clearly give information how they eat and walk. As dog is also animal. it have the characteristics of animal so it extends or implement Animal class and in that class we need to define exactly how they walk and eat Due to lack or vary of information we use abstraction to define it clearly in its child class But can you tell me that can it be used in android development if yes then where and hou
Abstract classes provide a way to enforce a certain structure in the inheritance hierarchy. By having abstract methods in the abstract class, you ensure that concrete subclasses must provide implementations for those methods. This helps in maintaining a consistent design.
apne ager Animal class ka hi object banaya hota toh super keyword ka use karne ki jarurat he nhi padti sir ji. like ex: Animal obj = new Dog; Animal Obj2 = new Lion; obj.sound(); Obj2.sound(); thank you
Aik bat samjh nhi ayi is ka faida kesy hoya? inherit ho rahi hai classes super se lekin method sab mein apna call ho raha same as hierarchical inherit ki working hai clear this point
MashaAllah sir you are very good teacher forever
Apki sikhane ki technique bhut achi hai thanku
Thanks mere bhai you made my programming career , I really appreciate your hard work.
Ap programmer hai
Mujhe bhi guide krdo
Very nice explanation
great job
mashaALLAH sir keep it up.
Veryy helpful ❤️
Thank you Sir! :)
Amazing ❤
In main function the object will be animal r = new Dog() and animal l = new Lion()..
Thank u so much sir🙂
Thank you brother for your help
sir aap must padhate ho
Thanks sir
When you ans my comant then I subscribed your chanal
Please ask your question
Sir mujhe ek doubt hai , mene dekha ki yahan abstract method ek template ki tarah work kar raha hai and baki another Child class us template ko use karke apna apna behaviour show kar rahe hai to sir ye to method overriding ki tarah hi hua na kyu method overriding me bhi same method name hota tha but uska behaviour sabhi child class apni requirements ko dekh kar define karte the .
To sir mujhe ek doubt hai ki method overriding and abstract method me kya difference hai ?
thank u so much
yaha per hum animal class ka(parent class) ka referance variable bana ke bhi subl classes ko call ker sakte hai kya... ?🤔👇
animal r = new Dog();
animal l = new Lion();
Aur public keyword nahi use kiya to bhi chalaga
Thank you so much sir😇, Great Explanation SIr👏👍
Tq sir 🙏
Which app do you use for java
Sir net web designing ke MCQ notes mil jaenge
Advance java pe video bnaye
Yha par @Override use kyon nhi kia h?
Sir ager abtract class man aek se zayada normal constructors hon..tu super ka word kis ko call kare ga
Jisko hm mentioned krege super Keyword k saath 🙂
Can you make spring boot video, I’m eagerly waiting this
In this Abstraction program ,there is inheritance fine, but there is also polymorphism MEDHOD OVERRIDING [ public void sound ( ) ] and ur still saying its abstract ???
Yaa ofcourse where there is inheritance there will definitely method over riding comes bro
It's correct example for abstraction
Bro your all videos are useful nd u are a good youtuber..but your voice is gruff so you should your voice bold then I'll understand very well..nd thanks for reaching us..
why did you use
public abstract void sound( ) in abstarct class?
Just for explaining the things.
I wonder why to use abstract
Look we only create method in parent class and in child class(dog & lion) we even create method and write code and call method in main class. But we can do this without parent class eg. We need to create 2 class (dog & lion) and inside it we can create method eat() and call it in main class .
So why to use abstraction?
you are thinking like a C programmer . You are forgetting that java follows OOP paradigm . To maintain the relationship between a generic animal with its different instances is basically an act of inheritance. With your logic why is inheritance even exists then??. Think like a real -life world problem . And don't deviate from OOP. Like we Humans Belong to Animal class which is the super Class of Animal Kingdom . After that animals gets sub divided into mammals, Amphibians, Reptiles, Avians, fish and invertebrates. This abstract class of animal kingdom doesn't have enough characteristics to differentiate each animal . It may have basic info like, an Animal will eat food, it will have legs etc. but it can't give characteristic like colour , no. of legs , life expectancy. The use of abstract class is to make a standard genaralized characteristic which every animal must follow. This analogy is very important in terms of software development and even with game development.
@@DreamDropsTV wow thankyou sir
@@DreamDropsTV you mean Animal have the characteristics of eating, walking but it cannot clearly give information how they eat and walk. As dog is also animal. it have the characteristics of animal so it extends or implement Animal class and in that class we need to define exactly how they walk and eat
Due to lack or vary of information we use abstraction to define it clearly in its child class
But can you tell me that can it be used in android development if yes then where and hou
Abstract classes provide a way to enforce a certain structure in the inheritance hierarchy. By having abstract methods in the abstract class, you ensure that concrete subclasses must provide implementations for those methods. This helps in maintaining a consistent design.
Please ek project bhi bnana dikha do me fresher hu
I am from NIT [CSE].I can teach you if you want😊
sub class me constructor nhi bna rahe tab bhi constructor call ho raha hai ?
what should be the mane of the class in the dog and lion example??
apne ager Animal class ka hi object banaya hota toh super keyword ka use karne ki jarurat he nhi padti sir ji. like ex:
Animal obj = new Dog;
Animal Obj2 = new Lion;
obj.sound();
Obj2.sound();
thank you
WOO ABSTRACT CLASS HYE BRO
REFRANCE BOLO
exactly, good that you pointed out
i was confused there lol
Sir how to installed java in computer
Install java jdk 👇👇👇
ruclips.net/video/TNoggqhhvZo/видео.html
Ye jo last per howa wo to super use kiye begair or child class mein constructor na bhi banao to print ho raha hae
Bhai 😰 I have a One Doubt How The " All animals ....! " Was Print In 2 Times Please Answer My Question
bhai, do baar object create kiye na isiliye..
run nhi hora jese tumne bataya ese hi kia
Bhai dog class me sound method ko @override kiu nahi kiya??
Kyonki abstract class ke andar abstract aur non abstract dono methods hote hai jo abstract honge unko override krenge baaki ko nhi
Kabhi kabhi to lagta ki tumich bhagwan ho bawa
Are nhi yaar, mere bhai बहुत अच्छा लग रहा है!😃😃😃 thank you so much
Thank sir jisko v smjh aaya comments kro
🙏🙏🙏
Anshu please contact, I want to talk to you
Yes sir abcause tell me
Isme hum override kyu nhi karrahe jabki next video mein ise kar rahe hain
Hum sound class ko dono sub classes me override ker to rahe hi
Super keyword must be first statement to call constructor
Yes
Aik bat samjh nhi ayi is ka faida kesy hoya? inherit ho rahi hai classes super se lekin method sab mein apna call ho raha same as hierarchical inherit ki working hai clear this point
same doubt
ISme overriden nahi use kia hai
isme alag kya hua bhai method to phir b banaye alag alag class mai
can we name the class as the name of our abstract class?
I think no because in intellij idea when I named the class as the name of abstract class there is showing error..
Awsome sir..can i contact with you
He is asking you question and you are liking the comment😂
Sir mere ko coding ka first part ka link do
C or C++ or Java kiska link de ya phir koi topic ka link bolo
@@LearnCodingOfficial sir g mere ko coding sikna hai to aap bolo first Kay sikna hai
Phle aap c language sikho uske baad java ya phir python dono me se ek choose kro aur career me aage बढ़ो
@@LearnCodingOfficial koi free learning hai kay🥺🥺
Sir please first explain html
After java html
Mujhe samajh nhi aya bhai
Please ask
ALlEenahalwalkfbud
Kuch bhi padha diya bhai ....
Pichla lecture dekho
@@viholvishwassinh1709 bro 9 month ka baad batane ka no use 😅 i guess exam tho ho gye 😅😅
😂@@honeman@avi😂