Lecture 24 Abstract Method in Java Hindi

Поділитися
Вставка
  • Опубліковано 28 вер 2024

КОМЕНТАРІ • 157

  • @anshumansinghrajawat7242
    @anshumansinghrajawat7242 4 роки тому +14

    your videos are better than even paid courses ,you really explain everything in a very deep and simple manner in simple language.U are amazing

  • @Naveen-hj9vx
    @Naveen-hj9vx 7 років тому +71

    sir you are great!!! aisa hmre teacher nhi padate!!thnku sir aapne hum garibo k lie yh video upload ki ...god bless uh sir

    • @namansharma012
      @namansharma012 6 років тому +2

      Ek dum sahi kaha aapne Naveen ji :)

  • @abhishek9354
    @abhishek9354 2 роки тому +2

    I am 4yrs experience guy of Automation testing... But was very confused about abstract keyword... But after watching ur videos, I m very much clear ... Thanks for providing such contents.. it's helping for freshers as well experienced guy 🙏🙏🙏

  • @lokendrasingh-gd4er
    @lokendrasingh-gd4er 5 років тому +24

    by watching these video i am able to crack interview Thankyou sir

  • @SmartProgramming
    @SmartProgramming 6 років тому +4

    nice one sir, clear explanation, like it 👍

    • @vinaypandey4752
      @vinaypandey4752 5 років тому

      I understand how to create the Abstract class and method, but why we need to create the abstract class and method. What is use, e can directly use the child class method no need of parent class.

    • @prashantkumarthakur8549
      @prashantkumarthakur8549 4 роки тому

      @@vinaypandey4752 , sir explained your querry in this video

  • @soumyaagarwal4401
    @soumyaagarwal4401 5 років тому +6

    Your videos are awesome👌we can get depth practical knowledge by it....Thank uu soo much sir☺

  • @vyankateshdhage8315
    @vyankateshdhage8315 5 років тому +4

    It is very good explaination. i understand my all doubts.

  • @prakashkoppal2614
    @prakashkoppal2614 3 роки тому +1

    Awesome sir... My all doubts are clear..
    Before watching your video it was like
    Iron peanuts 🥜

  • @Bhr84
    @Bhr84 29 днів тому

    wow !! wonderfull teaching !! i am seeing this playlist after 8 years

  • @chittranjankumar5769
    @chittranjankumar5769 3 роки тому +1

    very clear explanation and concepts

  • @prashantkashid3354
    @prashantkashid3354 2 роки тому

    i am fortunate to be part of your teaching through youtube ....god bless you sir

  • @sabbirhossain5341
    @sabbirhossain5341 6 років тому +1

    ap ko lecture dekh kar aisa mehsus hua java itna easy language hai aur hum dar kar bhaage

  • @somadasgupta8859
    @somadasgupta8859 6 років тому +2

    Its very helpful sir..thanks for this vedio..

  • @Entertainment-sh4ew
    @Entertainment-sh4ew 9 років тому +4

    Thank you sir, please describe abstraction with inheritance

  • @gamerdon6
    @gamerdon6 3 роки тому +1

    superb

  • @anupamr437
    @anupamr437 17 днів тому

    If any class contains at least one abstract method, it needs to declared as an abstract class.
    That doesn't mean abstract class needs to have an abstract method.
    Abstract class can have:
    1. static variables and static methods.
    2. instance member variables and methods.
    3. Constructor which are called when a regular method inherits the abstract class and by constructor chaining parent constructor runs before child constructor runs.
    4. final member variables and final regular method
    But not final abstract method as making a method final means it can't be overridden and abstract means it should be overridden. So it becomes opposing.

  • @sankalpsachan9199
    @sankalpsachan9199 3 роки тому +1

    Love with the video ❤️

  • @shubhamwaghe7734
    @shubhamwaghe7734 4 роки тому +1

    Very well explained!

  • @goodsguider
    @goodsguider 6 років тому +1

    Awesome Sir

  • @docscontacts33
    @docscontacts33 6 років тому +1

    wooow sir good

  • @mr.ebrahimvworld6425
    @mr.ebrahimvworld6425 6 років тому +1

    thanq you so much sir
    these videos are very helpfull for us
    big respect for you...

  • @kunaldubey
    @kunaldubey 5 років тому +1

    Sir, what you taught was very clear but the real life example of why we are creating abstract method was not very clear.. Can you take another example and explain the need for abstract method.

  • @shubhammukherjee6845
    @shubhammukherjee6845 6 років тому +1

    Sir, Your videos are very helpful. I been following your videos for quite a lone time. Sir, in this tutorial and some previous one too, I did see when you're describing inheritance by a simple diagram, the arrow always comes from the parent to the child class. But Sir, are we not inheriting from the parent class? So the arrow must be from the child class to the parent class. Am I missing something ? Thank you For your effort though.

  • @rohananand8253
    @rohananand8253 4 роки тому +1

    Thank you sir

  • @karansiddhu4750
    @karansiddhu4750 4 роки тому +1

    sir app best ho

  • @inzamamawan5188
    @inzamamawan5188 6 років тому +1

    respect sir very useful

  • @sonali10380
    @sonali10380 5 років тому +2

    Sir Aapne jo bank accounts ka example diya hai usme account class abstract nahi liya hai lekin usme abstract method calculate ki banayi hai

  • @13_anujgupta94
    @13_anujgupta94 3 роки тому

    Great sir .

  • @paragmarakana
    @paragmarakana 7 років тому +1

    Thank you sir, please describe Graphics Programming using AWT.

  • @Abinash91
    @Abinash91 6 років тому +5

    Thanks for making this series of beautiful videos sir.

  • @SachinKumar-li2tj
    @SachinKumar-li2tj Рік тому

    Sir please explain object cloning in java

  • @nikitasinha8181
    @nikitasinha8181 5 років тому +1

    Thank you so much sir 🙏

  • @statusguru5251
    @statusguru5251 6 років тому

    Suppose ,maine abstract super class me kuch variable declare kiye aur unhe inherit karke ek sub class me lau to wo sub class abstract banani padegi to unako use karneke liye mujhe unko sub class me firse define karana padega to mujhe 2bar define karke kya faida.... Mujhe ye kehanahe sir ki 2bar define karne ke alava me ek bar kyo n variables ki define karu....

  • @puneetyadav7802
    @puneetyadav7802 8 років тому +1

    great ,sir 🙏🙏

  • @whitedevile3084
    @whitedevile3084 4 роки тому

    thanks guru g

  • @siddhantjha6649
    @siddhantjha6649 5 років тому

    Mast

  • @usmanmehdi4887
    @usmanmehdi4887 5 років тому +1

    hello sir! thank you so much for making this kind of videos, these are very helpful. Sir I have a question regarding this lecture and that is, we are making abstract method in an account class that is abstract class but if we make this method non abstract like (double calculate interest(){...} ) though it will be inherited by the subclass so, why we are making this method abstract whereas it will be done without abstract?

    • @pradhanipradhani4230
      @pradhanipradhani4230 5 років тому

      Same question arise in me

    • @sparshagrawal3506
      @sparshagrawal3506 4 роки тому

      In this case, we would not be able to see the use of making it abstract. Let us assume you want the different body of the same (double) method in two different subclass objects of the superclass, then to make that we must have to make it abstract so that we could change it accordingly.
      For ex:
      abstract class a
      {
      abstract void m1();
      }
      class b extends a
      {
      void m1(){
      System.out.println("Hello");}
      }
      class c extends a
      {
      void m1()
      {
      System.out.println("Hii");}
      }
      class imp
      {
      public static void main(String[] args)
      {
      b o1=new b();
      c o2=new c();
      o1.m1();
      o2.m1();
      }
      }

    • @sparshagrawal3506
      @sparshagrawal3506 4 роки тому

      @@pradhanipradhani4230 In this case, we would not be able to see the use of making it abstract. Let us assume you want the different body of the same (double) method in two different subclass objects of the superclass, then to make that we must have to make it abstract so that we could change it accordingly.
      For ex:
      abstract class a
      {
      abstract void m1();
      }
      class b extends a
      {
      void m1(){
      System.out.println("Hello");}
      }
      class c extends a
      {
      void m1()
      {
      System.out.println("Hii");}
      }
      class imp
      {
      public static void main(String[] args)
      {
      b o1=new b();
      c o2=new c();
      o1.m1();
      o2.m1();
      }
      }

    • @saumyojitdas4212
      @saumyojitdas4212 4 роки тому

      @@sparshagrawal3506 class a
      {
      void m1();
      }
      class b extends a
      {
      void m1(){
      System.out.println("Hello");}
      }
      class c extends a
      {
      void m1()
      {
      System.out.println("Hii");}
      }
      class imp
      {
      public static void main(String[] args)
      {
      b o1=new b();
      c o2=new c();
      o1.m1();
      o2.m1();
      }
      } if i dont have abstract class will this code have no meaning

    • @shivinrana
      @shivinrana 4 роки тому

      @@sparshagrawal3506 bhai jaisa ki sir ne video me btaya h ki agr hm abstract class ko inherit krte h and usme koi abstract method h to subclass ko bhi abstract krna pdega.
      And aapne aisa nhi kiya...
      M agree with your answer but not agree with sir's this lecture

  • @vinaypandey4752
    @vinaypandey4752 5 років тому

    I understand how to create the Abstract class and method, but why we need to create the abstract class and method. What is use, e can directly use the child class method no need of parent class.

  • @AtulSharma-rx7rz
    @AtulSharma-rx7rz 5 років тому

    Sir, if we have to override an abstract method in child class, then what is the need of an abstract method in the abstract class? We can simply inherit the abstract class and create the same method in child class. Then what is its use?? Please explain.

  • @manzoorahmad3519
    @manzoorahmad3519 7 років тому

    Sir agar hum abstract method kilye overriding karen ge to per inherite karne ka kia piada ???

  • @digvijaypal7101
    @digvijaypal7101 6 місяців тому

    How can be create an incomplete class without using abstract keywords in java

  • @vijaynikk
    @vijaynikk 8 років тому

    Very Informative

  • @popatchavan272
    @popatchavan272 6 років тому

    sirg u r greate...please kbhi pune mai aeyee...

  • @aleehuxnain7870
    @aleehuxnain7870 6 років тому

    Hello Sir..Agar hmary pass 1 aisi class or aa jaye jo Saving account sy extends hui ho kya us k liye b zrori hai k wo Account class k abstract method ko define kry....KIndly tell me answer?

  • @codeplay12
    @codeplay12 2 роки тому +1

    ,🙏🙏🙏👏👏👏👏👏

  • @ashishkumarmishra2346
    @ashishkumarmishra2346 4 роки тому

    can we declare static method as abstract?? Ex: abstract public static void getArea(int r); //correct or not??

  • @paragmarakana
    @paragmarakana 7 років тому

    sir, please ye topic bataye Graphics Programming using AWT.

  • @satyamraut333
    @satyamraut333 4 роки тому +2

    7:42 why abstract method is used

    • @diverseduniya
      @diverseduniya 4 роки тому

      to force subclasses to use that function

    • @satyamraut333
      @satyamraut333 4 роки тому +2

      @@diverseduniya bro actually I have placed this time stamp here becoz whenever l'll have doubt on this topic then I'll directly jump here 😂😂😂
      but thank u...stay safe 🤘🤘🤘

    • @diverseduniya
      @diverseduniya 4 роки тому

      @@satyamraut333 great bro

  • @mobeenahmedawan5075
    @mobeenahmedawan5075 5 років тому

    abstract class Animal {
    int legs = 0;
    abstract void makeSound();
    }
    class Cat extends Animal {
    public void makeSound() {
    System.out.println("Meow");
    }
    }
    public class Program {
    public static void main(String[] args) {
    Cat c = new Cat();
    c.makeSound();
    }
    }
    Ya code run hota hy koi error ni ata. Jb k cat class abstract ni hy. Kya abstract likhna zaruri hy??

  • @prernabhatra1479
    @prernabhatra1479 6 років тому

    sir sub class bnane Wala parant class k function ko apne according define krega Kya?

  • @vikaschauhan4454
    @vikaschauhan4454 7 років тому

    Very nice

  • @VivekYadav-ds8oz
    @VivekYadav-ds8oz 5 років тому +4

    EDIT: ignore the stars and underscores, I thought I could format this *explanation* to look good, but unfortunately UA-cam is broken!
    Mujhe suddenly *click* hua abstract classes kyun banate hein!
    To attempt polymorphism!
    Eg- Suppose bahut saare type ke shapes hein hamare pass, jinki hmne classes banai:
    * public class Triangle * ,
    * public class Square * ,
    * public class Rhombus* , etc.
    Meine in sabke andar _public int getArea()_ ,
    _public int getPerimeter()_ functions banake rake hein.
    Now suppose I want to make a function that prints area and perimeter of a given object of any of these classes:
    * public void printAreaAndPerim(Triangle triangle)*
    *{*
    * System.out.println("Area: " + triangle.getArea() + "
    Perimeter: " + triangle.getPerimeter());*
    *}*
    ...but now I have to create this function for every Shape!!! Imagine so many overloaded functions! It will be a mess to manage.
    Even worse, agar mujhe kisi din aur shapes banani huin to mujhe fir se unke liye bhi ek naya overloaded function banana padega!
    Solution: Make a base abstract class.
    Mein in saari shapes ke liye ek base (abstract) class banaunga: *Shape* .
    Mujhe nahi pata har shape ka area aur perimeter ka formula, to me wo *Shape* ke derived classes ko implement karne ke liye chodh sakta hun.
    i.e:
    _abstract public class Shape _
    _{_
    _public int getArea();_
    _public int getPerimeter();_
    _}_
    Ab, me har class ka definition change karke kar dunga:
    _public class extends Shape{_
    ....
    _}_
    ....Best part! Now I can just make the function definition to:
    _public void printAreaAndPerim( *Shape* shape)
    {
    System.out.println("Area: " + shape.getArea() + "
    Perimeter: " + shape.getPerimeter());
    }_
    And that's it!! All kinds of shape taken care of!

  • @dogememe216
    @dogememe216 2 роки тому

    if we can't create objects of abstract classes than why we need that??

  • @rishu578
    @rishu578 7 років тому +1

    sir to fir hmlog abstractnmethod fir q bna rahe hai jab hmko extend class me method banana he pad raha hai to hm bina abstract ke method bna ke use to kar sakte hai na????

    • @Naveen-hj9vx
      @Naveen-hj9vx 7 років тому +2

      ha lkn aagr abstract lga dega to forcefully hme overrriding krni hogi kuki agr abstract nhi lgnge to jaruri nhi h override krna lkn isme complsary h ......i hope apko smj aayi ho

    • @tahirmahmoodhashmi7418
      @tahirmahmoodhashmi7418 7 років тому

      Lekin agar humne apni abstract class me koe abstract method declare kar dia jisme humne kuch return type
      aur parameter bhi set kar diye, to ye kese ty ho skta hy k is me kon kon sy parameters
      ayengy. aur wo kia kia information rakhengy. q k ye method to ham teacher k liye
      bhi use karengy aur student k liye bhi.. aur phir is tarha karengy to dono calss me ek jese hi parameters bnny parengy aur parameters to ham variable ko initialize
      karne aur us me values dalny k liye use karty hain.
      To abstract method ka faida kia hua???

  • @gautamsarma5002
    @gautamsarma5002 7 років тому

    sir ek java ka project class please diji ae then all student helps hoga

  • @pawansinghofficial3313
    @pawansinghofficial3313 6 років тому +2

    sir is it possible to lern JAVA without knowing C and C++

    • @MrSaransh
      @MrSaransh 6 років тому

      Yes we can . tumhe bus loops , conditions , variables k baare me padna hoga. best hoga python seekh lo. kum time lagega. accha bhi hoga.

  • @fahadjhon3995
    @fahadjhon3995 4 роки тому

    sir plz use netbeans or eclipse

  • @pradhanipradhani4230
    @pradhanipradhani4230 5 років тому

    Extend class main bhi method likhan padta he to abstract quen banate

  • @vishalkumar6454
    @vishalkumar6454 6 років тому

    sir abstract class & method thora aur explain krye

  • @ravindersanjay
    @ravindersanjay 5 років тому

    When we are not using abstract method of supar class then why we are creating it ?

  • @manjeetchauhan3427
    @manjeetchauhan3427 7 років тому

    Fantastic....sir...have you made videos for android??

    • @PramodSingh-kt5of
      @PramodSingh-kt5of 7 років тому

      learn java first ....coz android dont have any scope now bcoz many android developers are there and i am also the one in bangalore

    • @rahulrajput2641
      @rahulrajput2641 6 років тому

      Really ?? NO Scope in Android??

  • @hukamtopal6836
    @hukamtopal6836 6 років тому

    Thanks sir ji

  • @sHIBAray-b1r
    @sHIBAray-b1r 6 років тому

    thankyou sir.

  • @viz_on
    @viz_on 5 років тому

    After overriding the abstract method on the child class, we can instantiate its object. Is that only the logic? Anybody please help

  • @ishitachawla9314
    @ishitachawla9314 4 роки тому

    sir, could you please tell, why main class has been made abstract?

    • @techoperator6224
      @techoperator6224 3 роки тому +1

      main class is not abstract clas , it is just named abstract

  • @prakherjindal5440
    @prakherjindal5440 7 місяців тому

    07:45 - 11:45

  • @kumaraniket3300
    @kumaraniket3300 6 років тому

    thnku sir

  • @binteasif2491
    @binteasif2491 7 років тому

    sir kia abstract class mei non abstract methods bi hoty hein??????

  • @Anjaliverma-he1el
    @Anjaliverma-he1el 6 років тому

    Child class ko abstract nhi bnayenge qki hume object bnani hoti hai....But child class extend to karti hai super class ko...To... Abstract property to aayegi na child class me....👍
    Ise bhi clear kigiye sr

    • @Anjaliverma-he1el
      @Anjaliverma-he1el 6 років тому

      Saiklum Mushahary ok sir...
      Thank you...

    • @saumyojitdas4212
      @saumyojitdas4212 4 роки тому

      @@Anjaliverma-he1el then we can simply have left abstract class only without creating methods. WHat is the point of creating methods then?

  • @saumaykhandelwal5190
    @saumaykhandelwal5190 7 років тому

    why do we use abstract methods?.. anyway.. we are not doing any coding inside them! sir.. please explain with help of a sample case where abstract methods are useful.

    • @javabysaurabhshuklasir3459
      @javabysaurabhshuklasir3459  7 років тому +2

      1) Force to make containing class abstract
      2) force subclass to define abstract method

    •  7 років тому

      Can u please make a video on dependency Injection and Collision Principle

    • @saumyojitdas4212
      @saumyojitdas4212 4 роки тому

      @@javabysaurabhshuklasir3459 these 2 will happen automatically ??

  • @vivekarya4910
    @vivekarya4910 7 років тому

    thank u sirrr... :-)

  • @shaikhidrees22gmail
    @shaikhidrees22gmail 8 років тому +1

    u r great sir

  • @krunalkp1032
    @krunalkp1032 6 років тому

    what is wrong in this code ?wow whoa what an explanation !!!!!!!!!!!!!!!!!!!!!!!!!!

  • @riyakostha6534
    @riyakostha6534 5 років тому

    Why make example class abstract??

    • @mehulkumar3469
      @mehulkumar3469 4 роки тому

      Class is not Abstract its the name of class and alsi notice the keyword of any abstract class is
      abstract class_name ;

  • @After5artwork
    @After5artwork 7 років тому

    Sir,will you please expound the use of abstract methods?

  • @sudhanshusharma7
    @sudhanshusharma7 4 роки тому +1

    C++ nahi padhaa kyu nahi samajhte aap

  • @kritikasahare1575
    @kritikasahare1575 6 років тому +1

    Everything is fine just stop saying fuctions... Java have methods not functions.

  • @DeepakSingh-cq1rf
    @DeepakSingh-cq1rf 8 років тому +8

    Very helpful video. I was english medium student but still i feel great to learn in hindi.

  • @sabbirhossain5341
    @sabbirhossain5341 6 років тому +1

    Thank you so much ,sir

  • @thedvn3895
    @thedvn3895 4 місяці тому +1

    offline couching se java sikhna❌ java by saurabh sir ✅

  • @alina_dial
    @alina_dial 7 років тому +3

    you are a great teacher , your lectures are simply best ,keep up the good work sir , and please make more videos ,we support you fully ,i like very video of yours and i have already subscribed you

  • @ANJALIKUMARI-uq6tg
    @ANJALIKUMARI-uq6tg 4 роки тому +2

    🙏🙏 my words can't describe how much ur video helped me ..u are unique sir

  • @Mrunal4041
    @Mrunal4041 3 роки тому +1

    best explaination ever thanks sir

  • @nabeelusmani5937
    @nabeelusmani5937 3 роки тому +3

    All applauses u well deserve sir 🔥

  • @samrajsinghsolanki9323
    @samrajsinghsolanki9323 5 років тому +1

    sir FYI 4.26 TIME pr ek error ye bhi to hai ki aapne example class ko public nahi liya jo ki nessesary hai ki
    main function wali class ko public kare ...
    BY THE WAY THANKYOU SO MUCH SIR FOR WHAT YOU DID TO US ...
    LIVELONG...

  • @bareetsingh
    @bareetsingh 4 роки тому +1

    Thanx Sir

  • @shineprincess9527
    @shineprincess9527 4 роки тому +1

    Sirrr you are awesome , splendid, wonderful, god bless you

  • @deepakchawla1105
    @deepakchawla1105 3 роки тому +1

    wonderful!

  • @theindiakhabar3597
    @theindiakhabar3597 2 роки тому

    Thanks sir ji 🙏🙏🙏❤️❤️❤️❤️🙏🙏🙏🙏🙏❤️❤️❤️❤️❤️❤️🙏🙏🙏🙏🙏🙏🚩🚩❤️❤️❤️❤️🙏🙏🙏🙏🙏🙏🙏🙏❤️❤️❤️❤️

  • @bhushankulkarni6358
    @bhushankulkarni6358 7 років тому +1

    sir these videos are nice but i want jdk1.0 to jdk 1.8 key features,i mean what are the content it has ,coz it is being asked so many times in interview i wish you will read my comment & give me proper guidance

  • @Honeysingh-cs8bi
    @Honeysingh-cs8bi 6 років тому

    abstract class A
    {
    abstract void f1();
    }
    class B extends A
    {
    void fi()
    {
    System.out.println("indian ");
    }
    }
    class abstract res
    {
    public static void main(String[] args)
    {
    B b = new B();
    b.f1();
    }
    } an error is gnret..in this error a msg print that B is not acstract and does not override abstract mathod f1() in A ..................pls help me sir..

  • @divyadixit3763
    @divyadixit3763 8 років тому +1

    awesome video sir thankuu so much

  • @Anjaliverma-he1el
    @Anjaliverma-he1el 6 років тому +1

    Thanku sir....Or clear hua abhi....

  • @rajatsonawale2957
    @rajatsonawale2957 7 років тому +2

    much simplified!!! thamks sir!!

  • @vijaypratapsingh3995
    @vijaypratapsingh3995 7 років тому +1

    Sir You are really awesome.

  • @akshaypatil8940
    @akshaypatil8940 5 років тому +1

    Sir ,you are really great ! Thank you so much .

  • @goodsguider
    @goodsguider 6 років тому +1

    You're a great #Sir

  • @savitaverma3469
    @savitaverma3469 5 років тому +1

    Sir u r amazing. U teach very well

  • @sujaybadgujar8357
    @sujaybadgujar8357 3 роки тому

    Best Explained Sir..

  • @786shefi
    @786shefi 2 роки тому

    Best explanation 👍