explain about casting of objects?

Answer Posted / rajesh

Casting can be applied to data types for like narrowing and
widening of primitive data types.
Casting can be applied for objects instantiated from the
inheritance hierarchy but only upward casting.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you detect memory leaks?

771


What is a null check?

752


Explain about assignment statement?

801


Why do I need to declare the type of a variable in java?

773


What does exclamation mean in java?

768


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

807


Do we have pointers in java?

715


Can a constructor be private and how are this() and super() method used with constructor?

733


Can a function return a function?

777


What is an immutable class? How to create an immutable class?

781


What is the generic function?

727


What are the characteristics of java?

726


Can we declare a static variable inside a method?

737


How many bytes is a string in java?

718


What is the list interface in java programming?

788