Core Java Interview Question on Inheritance | Automation Testing interview preparation by MKT

preview_player
Показать описание
To join my upcoming courses/classes please fill below form

Join this channel to get access to perks:

Like, share and subscribe to the channel.
API Testing Playlist

Core Java Playlist

Selenium Playlist

Manual testing Playlist

Watch my other videos too,
Inheritance in Java video

Single level inheritance video

Multi Level Inheritance in Java video

Hierarchical Level Inheritance in Java video

Hybrid Level Inheritance in Java video

Method Overloading in Java video

This calling statement in Java or this() video

Constructor Overloading in Java video

Constructor in Java video

Static and Non Static Variables in Java video

How to Create an Object in Java & Handing non Static method video

Multiple static methods inside a single Class | How to deal it?

Methods in Java | What exactly is public static void main(String[] args)

Types of Variables in Java | Local,Global & Final Variables

Variable and Datatype in Java

Easy way to run a program in Java | First program in Java

Class and Object in java

50 Keywords in Java

Tokens in Java

How Java internally works?| Compilation & Interpretation

Introduction to Java | History of Java |Features of Java
Derived model in software development life cycle video link

Prototype model in software development life cycle video link

Spiral model in software development life cycle video link

Verification and Validation in software development life cycle video

Hybrid model in software development life cycle video video

Waterfall model in software development video link

Software development life cycle video link

What is manual testing, it's advantages and disadvantages video link

What is Software testing video link

I work in the IT industry as a Senior Software QA Engineer in Bangalore, India and I have worked on mobile applications, web applications, and API testing.
The main reason behind this channel is to educate people about software testing so that it will helpful for them to choose the right career and also to prepare for their interviews.

Adding my blog link

Adding my personal mail Id:

Adding my Quora profile link here:

Adding my Twitter account here,
or
Facebook Page:

Join us on Telegram today,
SoftwaretestingbyMKT
For the latest update on software jobs and to discuss each and everything about Software Testing also get an opportunity to get on an audio/video call with me directly to you.
I make videos on daily basics and also help student all over the world for FREE. If my videos are helpful in anyway help "SoftwaretestingbyMKT" reach billions by supporting
OR
Рекомендации по теме
Комментарии
Автор

Yes it is possible to inherit properties of Sub-class or Child Class into Super Class by using the concept of Up-casting. Here we create one casting object and by using reference of that casting object we can use Sub-class methods or variables by using Super-class name or reference. Basically this concept is mostly used in Selenium
Example: WebDriver driver = new ChromeDriver ();
where, WebDriver is the Super Interface and ChromeDriver is Sub-class

shubhamjain
Автор

No, in object-oriented programming, inheritance works in the opposite direction. A subclass (child class) can inherit properties and methods from a superclass (parent class), but a superclass cannot inherit properties defined in its subclasses. Inheritance allows subclasses to extend or specialize the behavior of the superclass.

akshaysakhare
Автор

Yes ....super class inherit properties of subclass by performing down casting. ...we can convert the the address of subclass to Superclass By using that address/reference we can inherite the properties of subclass...!!!

ganeshlondhe
Автор

yes we can assigning sub class properties into super class n it is known as up - casting before perform up casting we supposed to do inheritance operation
down - casting means assigning super class properties into sub class but it is not allowed in java still if we used it then not any compiler error but runtime error should occur

tanujawaghela
Автор

In Java, inheritance is a unidirectional relationship where a subclass (also known as a child class) inherits properties and methods from its superclass (parent class), not the other way around. The superclass does not inherit anything from the subclass.

ramkumara
Автор

Yes, using we can perform Downcasting casting which has two things should be followed like upcasting valid and downcasting is dine explicitly by user.

dasariganesh
Автор

I think No. Inheritance concept is to inherit properties from one class to another but not vice versa. But since parent class reference variable points to sub class objects. So it is possible to access child class properties by parent class object if only the down casting is allowed or possible

techlearning
Автор

Yes... We can inherit the properties of sub class in to super class by up casting in this up casting child class will hide. Then we have to do the downcasting in the expliste way... Then we can access the sub class properties to the super class. With out doing up casting we are not able to do the downcasting.

bharathnekkanti
Автор

yes its possible to inherit the properties from super class to sub class.

shankarguru.d
Автор

Child can inherit the property of Parent class .. But In java Parent won't be able to Depend on Child class

mayurubale
Автор

Yes, by upcasting which non premative casting. Only inherited priority will be upset from child class to super class.

VYRL_Glitch
Автор

In object-oriented programming, it is not possible for a superclass to inherit the properties of a subclass. inheritance is a one-way relationship, with subclasses inheriting from superclasses, not the other way around.

murugeshwariravi
Автор

Yes we can see super class implementation along with sub class implementation by using super keyword, means we can inherit the properties from super class to sub class

sahanamotagi
Автор

This isnt possible using inheritance but it can be possible using method overriding and interface

melodiousneha
Автор

By using of extends we can get properties from super class to sub class.

kavya
Автор

Yes it is possible with upcasting we can convert child class objects to look like parent class object and access the properties of child class with help of parent class objects.

ashishkumarswain
Автор

Yes using dynamic method dispatching we can get super class functionality and that should be public.

saurabhgabhane
Автор

Yes, it's possible by down casting.

pradeeppatel-yoce
Автор

No, the Vice versa is possible because whenever any class inherits the property of any class then it's always termed as child class not super class.

skkamaluddin
Автор

We can do it with help of “super” keyword to share properties of child or parent or either between them.

yokesh