Why we need constructor inside an abstract class ? || Popular Java interview question

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

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

  • @theaveragebluejay
    @theaveragebluejay 6 лет назад +2

    This was very direct and easy to understand for me. I feel a lot better about abstract class constructors now. Thanks!

  • @krushalvirani1861
    @krushalvirani1861 4 года назад +1

    thanks bro, i am come here for understand how to call constructor on abstract class, but i got many more.

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

    Thank you for the clarification of the use of the term "super".It has always been a mystery to me.

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

    Thanks abhilash.. You are explaining clearly 👏

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

    Thank you, this was a very foggy topic for me appreciate the explanation!

  • @TheSarthak425
    @TheSarthak425 6 лет назад +3

    sir, Please try to include some examples where these concepts are used in real applications.

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

    Very nice tutorials...Too bad you do not have more of them.

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

    Expained well with a simple example. Good video. Should do more videos👏

  • @prasadsardesai
    @prasadsardesai 6 лет назад +4

    Can you please make a video on reflection class in java?

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

    very Good

  • @bharatkumarpatil1488
    @bharatkumarpatil1488 6 лет назад +2

    Simply extraordinary explains... Upload more videos...

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

    Super teaching sir plz upload all the java concepts sir

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

    Felt very happy by seeing this.
    Now I have a clear understanding about this. Many thanks to you :)

  • @prasadsardesai
    @prasadsardesai 6 лет назад +2

    Your channel name is Selenium express
    But I didn’t find any selenium videos here 🧐
    But your java videos are awesome 👏

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

    I always wait for your videos. Keep up the good work. 😀

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

    Great

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

    superb

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

    Sir one correction .... Bydefault all the variables inside abstract class is static ...but u said non static..clear my doubt

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

    Nice videos...

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

    Superb explanation bro

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

    very nice explanation ,thanks bro

  • @naveenkumarmaddala7830
    @naveenkumarmaddala7830 4 года назад +2

    What is the purpose of having variables inside abstract class. This creates the problem in extending classes. Correct me if I am wrong?

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

      As per my understanding, if you want only some methods as unimplemented to define them in child classes as required, but need remaining of them to be implemented as they are in the parent class

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

    Wow super

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

    Nice one, keep it up

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

    Thanks for the explanation !
    But , why cant you initialize all the 6 variables in the abstract constructor though?

    • @AJ-fb9pk
      @AJ-fb9pk 3 года назад +2

      Only the inheriting classes have those variables (k,l in Demo, x,y in Demo1). So those variables can be intialised only in those classes using the constructor.
      If you are asking why initialise in different places and just initialise everything inside the constructor of a single class?
      Well that is just a Design principle to avoid redundant code.
      For example:
      You could create a Abstract class for a Vehicle with params tireCount,seatsCount. The abstract class can be inherited by any type of Vehicle now. Like Car,Bike,Truck etc. and you don't need to add tireCount,seatsCount in every single class which avoids redundant code.

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

    Hi, Can you please explain on top of selenium web driver, how to create web driver instance using a constructor for every page?

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

    Hi Avi, can you please upload videos on lamda expression ?? I am following your videos which are awesome and easy to understand .

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

      Hi Jyotshna,
      I have already added lambda concept to my recording schedule.. They will be published soon..
      Thank you for the feedback,glad to know that you found these videos helpful.

    • @binaryautomation-sdets2336
      @binaryautomation-sdets2336 3 года назад

      @@SeleniumExpress still waiting those series bro.... lamda and streams api

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

    Nice Explanation bro...

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

    omg nice question and answer

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

    What is the real time use of this concept?

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

    Videos are nice, but please put only one ads.. In this video i got 3 times ads and in single time i am getting two ads so totally 6 ads for 12 min video....

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

    you are amazing

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

    very good explained! i wish my college instructor could explain things like this, he sucks!

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

    Sir we are not able creating object of abstract class then what is purpose of abstract class.

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

      Beacuse In abstract class, you can define as well as delcare many method. Now if you are not sure about some method implementation then you will ask other class to implement it own their own. Basically when there is need of partial implementation then you should go for abstract class. Yes you cant create Object. But you can extend this class to some other one and create object of that class.

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

    Only one thing i want to tell you ..keep in your mind..once a bihari s alwYs a bihari...