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

How can you make a class serializable in java?

944


What are the classes of java?

922


What is a file pointer?

994


Can we have more than one package statement in source file ?

964


What is unicode full form?

934


What access modifiers can be used for class ?

975


Differentiate storage classes on the basis of their scope?

1116


What is the difference between method overriding and overloading?

1177


What are the rules for variable declaration?

912


What is return in java?

909


How do you check if two strings are equal in java?

973


What is the difference between double and float variables in java?

1086


What is default constructors?

938


what is a thread pool in java and why is it used?

939


What about static nested classes in java?

1075