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 is meant by UP& DOWN casting in java?

Answer Posted / regalla soujanya naresh reddy

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 compiler because
it will internally take care of the casting. This is known
as Upcasting.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the components that are termed to be Heavy-weight component but available in Light-weight components?

2491


What are white spaces in java?

1050


What does the “static” keyword mean? Can you override private or static method in java?

1100


What is the significance of continue jump statement? Explain with an example.

1291


Explain what access modifiers can be used for methods?

1088


Is minecraft 1.15 out?

978


Implement a stack with push (), pop() and min() in O(1) time.

1114


How do you format in java?

1014


What is a stack class in java ?

1109


Explain restrictions on using enum?

1082


Compare overloading and overriding?

1005


What are some characteristics of interference class?

997


What do you mean by formatting?

996


Can we modify the throws clause of the superclass method while overriding it in the subclass?

1037


Can memory leak happen java?

1011