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 large is a boolean?

1066


Is java call by reference?

1027


What is object-oriented programming?

1209


What are the types of methodology?

1158


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

1053


What is methods in java?

1053


What is the difference between a choice and a list?

1134


What is Classloader in Java?

1299


How do you sort a string in alphabetical order in java?

972


What is boolean query?

1039


What is hashmap and map?

1079


How do you define a variable?

995


What is the major difference between linkedlist and arraylist?

1125


Can we pass null as argument in java?

1004


What is singleton pattern?

1161