Lecture 22 Constructor Chaining in Java Hindi

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

Комментарии • 89

  • @SmartProgramming
    @SmartProgramming 6 лет назад +16

    easy to understand with practical, nice sir, keep it up 👍👍

    • @AnuragRawat01
      @AnuragRawat01 11 месяцев назад

      U r also programmer now
      Knock knock

  • @shibinjohn2792
    @shibinjohn2792 5 лет назад +37

    Just like Indian Team Found Ms Dhoni..

  • @LalitKumar-qf2kr
    @LalitKumar-qf2kr 6 лет назад +17

    Actually You know how to teach sir. You are far better than IITians PROFESSOR.

  • @sabawoonbedar382
    @sabawoonbedar382 6 лет назад +1

    you are best teacher as so far I saw videos in youtube .... but the way you brief thats simply aesthetic

  • @thinkstackdeveloper
    @thinkstackdeveloper 9 месяцев назад

    No words to say sir You are great Your explanation is amazing like you have wrote a java

  • @shahzaibmughal3632
    @shahzaibmughal3632 7 лет назад

    Sir
    Aj pehli video aisi dekhi jis pr ak b dislike nahi hy
    Your Are Great, Love u sir seriouly :*

  • @payalchouhan2410
    @payalchouhan2410 7 лет назад

    Sir your video is very useful to those person who will really want to learn java but they can understand java concept in colleges or tuition... and this Vedic is also useful to me for learn java in detail ... thank u so much sir for providing this Vedic for us.

  • @vishalchauhan9832
    @vishalchauhan9832 5 лет назад +6

    Thank you so much sir for the excellent explanation!

  • @studyocity
    @studyocity 2 года назад +1

    sir kya mast explain kiya aapne bilkul easy way me samjh aa gya ❤

  • @parasthaker1223
    @parasthaker1223 3 года назад

    Hello, sir aap java main logic k programs videos banaye ap ka explination bahoti achha hai jo app explain kartein hai wo sab yaad reh jata hai or samj main bhi aa jate hai, job liye interview main mostly puchhe jane wala programs videos laye sir and thanks for teaching us. 😊

  • @hussain-yt2xl
    @hussain-yt2xl 7 лет назад

    thks sir good speaking in hindi as well as understanding of code ,i like that type of study becouse im not understanding by Choching Center or tuition....so u r very helpfully teaching world

  • @muhammadadnanakmal9590
    @muhammadadnanakmal9590 9 лет назад +9

    thanks sir (y)
    your student from Pakistan

  • @Top3Trendings
    @Top3Trendings 7 лет назад

    Thanks Sir you lectures are very Effective and also share these lectures to my friends.

  • @vikashmishra1903
    @vikashmishra1903 4 года назад

    Thanks sir for ur classes And if uf pass argument in main class object like
    B obj = new B (1);
    Then the constructor without argument will not execute..
    Out will be
    A 1
    B 2
    (B 1 will not execute)

  • @monishussain2839
    @monishussain2839 8 лет назад +1

    brilliant sir...all the concepts are cleared...

  • @orionbelt2266
    @orionbelt2266 4 года назад

    vai wah . kya samjhaya hai. very good.

  • @sawansharma1748
    @sawansharma1748 4 года назад

    It is such an excellent explanation. Thank you so much for this video:)

  • @rtube1771
    @rtube1771 8 лет назад +1

    Sir you are doing a great job!
    keep it up 😊

  • @afreenshaikh7558
    @afreenshaikh7558 6 лет назад +1

    Love you, great explanation

  • @AlokKumar-zn6ny
    @AlokKumar-zn6ny 4 года назад +1

    Very much informative lectures

  • @JayPatel-ou2ud
    @JayPatel-ou2ud 2 года назад

    Nice explanation 🙏🏻 thanks

  • @pallavikumari7074
    @pallavikumari7074 7 лет назад

    thanku sir for fantastic explanation and my concept of this.

  • @giridatta1525
    @giridatta1525 3 года назад

    Thank you sir,great explanation

  • @angelofdarkness243
    @angelofdarkness243 Год назад

    Thank you very much.

  • @vivekarya4910
    @vivekarya4910 7 лет назад +1

    it was very helpful sir...ty :-)

  • @sangamlahane1142
    @sangamlahane1142 7 лет назад +2

    Sir phir' this ' keyword ka use Kyu huva
    Kyu ki program ne call tho phir bhi A1 hi kia

  • @kushalmondal618
    @kushalmondal618 4 года назад

    Sir, The Explanation is super();
    But Sir, I have a question that Can we have Constructor Chaining through User give input??

  • @niyammuliya5787
    @niyammuliya5787 4 года назад

    sir, what is the difference between constructor with public access specifier and default access specifier?
    "public A()" and only "A()"

  • @sufyanali7686
    @sufyanali7686 7 лет назад +2

    Thank you sir! but i have a question sir.
    Sir what if super class have many constructors of different arguments(constructor overloading) then how will we call all of them by subclass object....?

    • @bhaskar8867
      @bhaskar8867 6 лет назад

      I think we can't call all the constructors of super class from subclass coz we can only use 1 super() or this().
      But you can call all the super class constructors before subclass constructors by the help of this().

    • @Engineering_Unlocked
      @Engineering_Unlocked 2 года назад

      Bro if we go on superclass than first of all , all constructors of superclass will run than come to subclass

  • @deepanshu_bansal
    @deepanshu_bansal 7 лет назад

    How can argument be passed in ctr being called by other ctr of same class? (ctr chaining case)

  • @shlok1108
    @shlok1108 8 лет назад +4

    Hi sir,
    can u plz provide me the link of the slides that u r showing in your videos so that i dont need to writedown everything i can just refer to those slides everytime i need to revise any topic..

    • @segarus95
      @segarus95 4 года назад

      bro try to make your own notes

  • @lifehacks9450
    @lifehacks9450 6 лет назад

    nice explaination

  • @soumyajitbanerjee1440
    @soumyajitbanerjee1440 6 лет назад

    Sir, can you please Show how to call any method from the body of another method..

  • @mohdfahimsaad4581
    @mohdfahimsaad4581 4 года назад

    This oppr likha he agar ham statment ke niche likhe ge tab to pahle b1 chale ga na?

  • @bareetsingh
    @bareetsingh 5 лет назад

    Thanx Sir

  • @preetibharti1387
    @preetibharti1387 7 лет назад

    sir please upload videos on J2EE

  • @nicksharma1754
    @nicksharma1754 6 лет назад +1

    Sir what would happen if we use this function in both the constructor of same Class
    I have not tried in on pc
    But out of curiosity I just want to know what would happen then?

    • @munishsharma5386
      @munishsharma5386 6 лет назад +1

      this error will come :- recursive constructor invocation

    • @virajtandel24
      @virajtandel24 5 лет назад +1

      this is not possible bcz the rule for constrctor chaining is that their should be atleat one constructor without this() keyword...

  • @priyachaudhary4145
    @priyachaudhary4145 8 лет назад +1

    sir plz add the videos of java swing

  • @anupamr437
    @anupamr437 4 месяца назад

    this(); represents constructor of same class.
    with use of this(); we can call second constructor of the same class from first constructor.
    If this() is used super() is not called.
    This is called constructor chaining.

  • @anujdhami2071
    @anujdhami2071 2 года назад

    Hi sir,
    Why can't we write both super and this in a constructor?

  • @YogiGhorecha
    @YogiGhorecha 6 лет назад

    great

  • @azizahmedkhwaja5187
    @azizahmedkhwaja5187 7 лет назад

    best sir g

  • @nothingbutsomething10
    @nothingbutsomething10 4 года назад

    Sir agar ham chahty hain k inheritance ma sub class k constructor ko call karny sy super class ka constructor call na ho or na hi constructor chaining ho. Laikin super class ma constructor mojod ho to ya kasy kary gy

  • @dikshajain1442
    @dikshajain1442 6 лет назад

    Sir,
    There is no lecture for the topic polymorphism.

  • @nothingbutsomething10
    @nothingbutsomething10 4 года назад

    Sir overloading k doran super constructor na chaly us k liy hta dy

  • @rohitkanchanshaw1482
    @rohitkanchanshaw1482 5 лет назад

    @2:38 sir yaha toh variable hai hi nahi toh constructor kyu bana rahe hai?...sir aisa kya kar sakte hai ya fir aap variable banana bhul gaye

  • @Engineering_Unlocked
    @Engineering_Unlocked 2 года назад

    Heyy sir and all guys
    I have a query that sir told us that super keyword is default and it comes by itself at the first line so if we write this() than why super is not defaultly come in the first line ??

  • @AnuragRawat01
    @AnuragRawat01 11 месяцев назад

  • @azizahmedkhwaja5187
    @azizahmedkhwaja5187 7 лет назад +4

    love u sir. from Pakistan

  • @madhvendrarai989
    @madhvendrarai989 5 лет назад

    Sir, super aur this dono likh nhi skte per kam to ho rha hai tbhi to tino output me aaya???

    • @technotutors1970
      @technotutors1970 4 года назад

      ek hi constructor me dono nhi likh sakte...yaha different constructors me likha he

  • @antareepdas4375
    @antareepdas4375 5 лет назад

    " this(i) " isme " i " zaroori hai kya.. Agar hai to kaise.???

  • @bhaveetk290
    @bhaveetk290 7 лет назад +6

    sir this video is having noise disturbance

  • @hassankhan-cq3zd
    @hassankhan-cq3zd 8 лет назад +1

    sir aap ny gui ki examples nhi dein

  • @deepanair2252
    @deepanair2252 8 лет назад

    Sir if there is only one constructor in child class B, i. e. public B ( ). And we call this( ) in child class constructor B( ). Then will it become recursion? Also, in this case parent constructor will not be called..

    • @sufyanali7686
      @sufyanali7686 7 лет назад

      @Deepa Nair It will be a compile time error...

    • @madhurbarsainya4871
      @madhurbarsainya4871 6 лет назад

      Sir wo compile time error tohh dega lekin aapne video(10.00) me mention kia hai ki first line is either this() or super() and defaulty it will be super() that means it can never be this()..M I right?

  • @PramodKumar-bg3uz
    @PramodKumar-bg3uz 6 лет назад

    Sir hum super or this dono q nahi used nahi Kr sakte

  • @ravisorathiya5408
    @ravisorathiya5408 5 лет назад

    What about parent class contrustctor is with parameter tham

  • @a.mytgaming8286
    @a.mytgaming8286 2 года назад

    Sir,
    Compile karne par super automatic aa jata hai....
    But this kyun nahi....

    • @nishantpawar8053
      @nishantpawar8053 2 года назад

      agar this aa gaya to usme parameter kaise aayenge

  • @shivampandey303
    @shivampandey303 4 года назад

    Sir kya aisa possible hai ki child constructor, parent constructor ko call hi na kare???

    • @technotutors1970
      @technotutors1970 4 года назад

      nhi bhai... its not possible because inherited instance variables ka initialization parent k constructor me hi hota he isliye parent ka constructor chalana zaruri ho jaata he

  • @muhammadadnanakmal9590
    @muhammadadnanakmal9590 9 лет назад

    Sir Constructor Chaining ka advantage kya hain

    • @saurabhsharma359
      @saurabhsharma359 6 лет назад +1

      Muhammad Adnan Akmal buddy if you want to prefrom a task in sequence as soon as your program run so for it you can use constructor chaining its mainly used in database connectivity

  • @praveenbadasar9956
    @praveenbadasar9956 6 лет назад

    Increase quality

  • @krunalkp1032
    @krunalkp1032 7 лет назад

    class A
    {
    int a;
    public A()
    {
    System.out.println("default class A");
    }
    public A(int b)
    {
    a=b;
    System.out.println("class A");
    }
    }
    class B extends A
    {
    int b;
    public B()
    { //*sir yaha par copiler super() nahi banata kyu?*//
    super(5);
    System.out.println("class B");
    }
    }
    class ContructorInheritance
    {
    public static void main(String[] args)
    {
    B obj;
    obj = new B();
    }
    }

    • @rupamsinharoy1991
      @rupamsinharoy1991 7 лет назад

      because you have called for super(4) in the first line of the public B(){ super (4); }.
      so, the control goes to public A(int b), instead of public A().
      if you had called just super () , the control would have gone to only public A().
      hope i have explained simply :-)

    • @krunalkp1032
      @krunalkp1032 7 лет назад

      rupam sinha roy . Thanks for reply but actually I m learning now DBMS ... And I forgot some concepts in java . 😂. I have to revision about it .. after revision I will read ur reply

  • @sunielnehra
    @sunielnehra 5 лет назад

    is video me mic ka gala kharab hogaya?

  • @payalchouhan2410
    @payalchouhan2410 7 лет назад +2

    Sir your video is very useful to those person who will really want to learn java but they can understand java concept in colleges or tuition... and this video is also useful to me for learn java in detail ... thank u so much sir for providing this Video for us.