what is meant by UP& DOWN casting in java?

Answer Posted / regalla soujanya naresh reddy

A super class reference can be converted into a subclass
reference but this
subclass reference is not useful to call the methods of any
of the classes. This convention is known as Downcasting.

We can convert the subclass reference to a superclass
reference without using the cast operation compiler because
it will internally take care of the casting. This is known
as Upcasting.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main in java?

792


What is unicode full form?

756


What is visibility mode?

737


What is a parameter in matrices?

766


What are different types of references?

756


How to make a class or a bean serializable?

739


What is string :: npos?

786


What happens if an exception is not handled in a program?

857


What is array command?

815


How can you say java is object oriented?

831


What is methods in java?

774


What do the thread?class methods run() and start() do?

786


What is generics in java interview questions?

779


List some oops concepts in java?

804


how to write a program for sending mails between client and server

1821