Parent class has run() and walk() . Parent run() - calls walk() Child Class overrides Parent class Inside run() - calls Walk() - calls super.walk In main class Parent p = new child() What will be the order of execution?

code be like package logical; public class Parent { void run() { System.out.println("Inside Parent's run"); walk(); } void walk() { System.out.println("Inside Parent's walk"); } } packag...
see more
Let's break down the order of execution step by step: Parent p = new Child();: Here, you are creating an instance of the Child class but assigning it to a reference variable of type Parent. This is a...
see more
The order of execution will be: parent's run() -> child's run() -> parent's walk()When is called, it will first execute the run() method of the parent classInside the parent's run() method, it...
see more
Add answer anonymously...
Wissen Technology Java Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
55 L+


5 L+


2 Cr+


1 Cr+


Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2023 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Hello, Guest
Contribute to help millions!
Write a review
Share interview
Contribute salary
Add office photos
Add office benefits