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 data type is a string?

1059


What is the java virtual machine?

1139


Can a class have a static inner class?

1117


Which class is the superclass for all the classes?

1062


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

1022


Why java is object oriented?

1082


What is int lol?

1188


When should I use stringbuffer?

1056


Why do we need wrapper class?

1040


Is static a keyword in java?

1029


What are void methods?

1062


What are the different types of constructor?

1038


What is singleton class in ruby?

1067


What are synchronized blocks in java?

1275


What is the difference between serializable and externalizable interfaces?

1170