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

preview_player
Показать описание
Hi coder!! This tutorial covers a complete abstract class example where we are going to learn why we need a constructor in abstract class.

One of the differences between abstract class and interface in java is :
The interface doesn't have a constructor but the abstract class in Java can have constructor within
it.

Then the question we can’t create an object for
both abstract class and interface then why abstract class can have a constructor when the
the interface doesn’t.

So let's understand this thing with an abstract class program which is a very popular java interview questions .(core java interview questions)

Please subscribe to my channel if like this tutorial by clicking on the link below.

Stay tuned and like my Facebook page for more.

Music :
-----------
credits : -

Creative Commons — Attribution 3.0 Unported— CC BY 3.0

-----

intro template :
Рекомендации по теме
Комментарии
Автор

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

astonmargolis
Автор

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

krushalvirani
Автор

Thanks abhilash.. You are explaining clearly 👏

believe
Автор

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

pooransingh
Автор

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

theaveragebluejay
Автор

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

somias
Автор

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

bharatkumarpatil
Автор

Super teaching sir plz upload all the java concepts sir

abhishekvirat
Автор

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

ivanpantic
Автор

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

rinsharinz
Автор

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

staslocovai
Автор

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

naveenkumarmaddala
Автор

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....

amitsiddhpura
Автор

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

prasadsardesai
Автор

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

TheSarthak
Автор

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

MyHemanthKumar
Автор

Your channel name is Selenium express
But I didn’t find any selenium videos here 🧐

But your java videos are awesome 👏

prasadsardesai
Автор

What is the real time use of this concept?

onkartiwari
Автор

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

sambitpradhan
Автор

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

rajap