No video

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

  Рет қаралды 52,031

Selenium Express

Selenium Express

6 жыл бұрын

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.
/ @seleniumexpress
Stay tuned and like my Facebook page for more.
/ seleniumexpress
Music :
-----------
credits : -
Adventures by A Himitsu / a-himitsu
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons....
Music released by Argofox • A Himitsu - Adventures...
Music provided by Audio Library • Adventures - A Himitsu...
-----
intro template :
wkzfaq.info

Пікірлер: 47
@astonmargolis4391
@astonmargolis4391 5 ай бұрын
Thank you, this was a very foggy topic for me appreciate the explanation!
@theaveragebluejay
@theaveragebluejay 6 жыл бұрын
This was very direct and easy to understand for me. I feel a lot better about abstract class constructors now. Thanks!
@SeleniumExpress
@SeleniumExpress 6 жыл бұрын
Thanks for the kind words 😊
@krushalvirani1861
@krushalvirani1861 3 жыл бұрын
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.
@chintadakiranraj7893
@chintadakiranraj7893 2 жыл бұрын
very Good
@believe4352
@believe4352 4 жыл бұрын
Thanks abhilash.. You are explaining clearly 👏
@rinsharinz2148
@rinsharinz2148 3 жыл бұрын
Expained well with a simple example. Good video. Should do more videos👏
@yatendra__singh
@yatendra__singh 2 жыл бұрын
Great
@anirbanmanna2897
@anirbanmanna2897 Жыл бұрын
superb
@bharatkumarpatil1488
@bharatkumarpatil1488 6 жыл бұрын
Simply extraordinary explains... Upload more videos...
@SeleniumExpress
@SeleniumExpress 6 жыл бұрын
Thanks, Bharat.
@naveenkumarmaddala7830
@naveenkumarmaddala7830 4 жыл бұрын
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
@TheSarthak425
@TheSarthak425 6 жыл бұрын
sir, Please try to include some examples where these concepts are used in real applications.
@prasadsardesai
@prasadsardesai 6 жыл бұрын
Can you please make a video on reflection class in java?
@WishesIWasBritney
@WishesIWasBritney 2 жыл бұрын
THANK YOU SO MUCH. I have been trying to figure this out for like 45 minutes and you explained it in two
@MyHemanthKumar
@MyHemanthKumar 6 жыл бұрын
Felt very happy by seeing this. Now I have a clear understanding about this. Many thanks to you :)
@SeleniumExpress
@SeleniumExpress 6 жыл бұрын
You are welcome, Hemanth. Have a good time!!
@ivanpantic6701
@ivanpantic6701 5 жыл бұрын
Very nice tutorials...Too bad you do not have more of them.
@somias1575
@somias1575 4 жыл бұрын
I always wait for your videos. Keep up the good work. 😀
@abhishekvirat5088
@abhishekvirat5088 4 жыл бұрын
Super teaching sir plz upload all the java concepts sir
@ChetanJain1507
@ChetanJain1507 3 жыл бұрын
Nice videos...
@33bockbock
@33bockbock 5 жыл бұрын
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! BEEN STUCK FOR A WHOEL DAY CAUSE MY TEACHER NOT MAKE SENSE!!!!!!!!!!
@srikanth29
@srikanth29 4 жыл бұрын
Wow super
@prasadsardesai
@prasadsardesai 6 жыл бұрын
Your channel name is Selenium express But I didn’t find any selenium videos here 🧐 But your java videos are awesome 👏
@SeleniumExpress
@SeleniumExpress 6 жыл бұрын
prasad sardesai ha ha.. Thanks..
@ibrahimshaikh3642
@ibrahimshaikh3642 5 жыл бұрын
Nice one, keep it up
@munaswamy6595
@munaswamy6595 5 жыл бұрын
Superb explanation bro
@shaikalwajid
@shaikalwajid 5 жыл бұрын
very nice explanation ,thanks bro
@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?
@sambitpradhan5463
@sambitpradhan5463 6 жыл бұрын
Sir one correction .... Bydefault all the variables inside abstract class is static ...but u said non static..clear my doubt
@sangram11100
@sangram11100 6 жыл бұрын
Nice Explanation bro...
@ashishbarik9936
@ashishbarik9936 6 жыл бұрын
omg nice question and answer
@deepakjava3506
@deepakjava3506 4 жыл бұрын
you are amazing
@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 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.
@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
@onkartiwari5742
@onkartiwari5742 3 жыл бұрын
What is the real time use of this concept?
@amitsiddhpura
@amitsiddhpura 4 жыл бұрын
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....
@mangeshhagare5356
@mangeshhagare5356 5 жыл бұрын
Sir we are not able creating object of abstract class then what is purpose of abstract class.
@ramdafale
@ramdafale 4 жыл бұрын
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.
@rayobits5028
@rayobits5028 5 жыл бұрын
very good explained! i wish my college instructor could explain things like this, he sucks!
@deepakmishra2804
@deepakmishra2804 6 жыл бұрын
Only one thing i want to tell you ..keep in your mind..once a bihari s alwYs a bihari...
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 6 МЛН
Pool Bed Prank By My Grandpa 😂 #funny
00:47
SKITS
Рет қаралды 18 МЛН
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 9 МЛН
Abstract Classes and Methods in Java Explained in 7 Minutes
7:00
Coding with John
Рет қаралды 500 М.
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 610 М.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 6 МЛН