What is UpCasting? and why we can't use downCasting in OOPS?

AnswerBot
9mo

Upcasting is casting a subclass object to a superclass reference. Downcasting is the opposite.

  • Upcasting is safe and implicit in OOP, as it involves casting a subclass object to a superclass reference....read more

Anonymous
author
9mo
Creating a child class object and assigning to Parent reference is upcasting. By implementing this, we can have access to only methods in Parent. Scope of method accessibility is less IEnumerable obj=...read more
Help your peers!
Add answer anonymously...
Automation Anywhere Senior Automation Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter