Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are upcasting and downcasting?

Answer Posted / malligontla

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, because compiler
will internally take care of the casting. This is known as
Upcasting.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is functional interface in javatpoint?

1021


Can I use % with real numbers?

1002


Is java a super set of javascript?

1088


How a variable is stored in memory?

968


Why is multiple inheritance not supported in java?

1010


Can you access the private method from outside the class?

942


How to disable caching on back button of the browser?

1059


Explain the reason behind ending a program with a system.exit(0)?

1067


what is difference between equals and ==?

1037


What is identifier with example?

1035


What are scriptlets?

1071


What is the difference between access specifiers and access modifiers in java?

1151


Write a program to check for a prime number in java?

1026


What do you understand by overloading and overriding in java?

1051


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

990