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 / arjun kumar

When we cast a reference along the class hierarchy in a
direction from the sub classes towards the root, it is an
upcast.
When we cast a reference along the class hierarchy in a
direction from the root class towards the children or
subclasses, it is downcast.

Is This Answer Correct ?    19 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does abstract class have constructor?

984


5 Coding best practices you learned in java?

1005


How do you make a thread in java?

1080


What are the methods to rectify ambiguities in the interfaces in JAVA?

1066


Explain the difference between collection api and stream api in java8?

952


How can you avoid serialization in child class if the base class is implementing the serializable interface?

1066


Can we override the static methods?

1018


Is overriding possible in java?

939


What is the difference between jfc & wfc?

1047


How many bytes is a char in java?

1002


How is hashcode calculated in java?

1011


What is the default value of local and global variables?

1074


Can you pass functions in java?

980


Does it matter in what order catch statements for filenotfoundexception and ioexception are written?

943


How do you find the maximum number from an array without comparing and sorting?

1108