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 does substring mean?

976


What are internal and external variables?

957


Can we make a constructor final?

1020


Why array is used in java?

968


how to create constants in java?

1083


What is comparator in java?

1000


What is the purpose of methodology?

1080


How to avoid memory leak in java?

1138


What is the difference between the font and fontmetrics classes in java programming?

1150


If you do not want your class to be inherited by any other class. What would you do?

1004


Explain list interface?

960


Why parameters should be passed by reference?

972


What are the uses of synchronized keyword?

1001


What is early binding and late binding in java?

1189


Which is the best sorting technique in java?

983