Answer Posted / vijayakumar chinnasamy
Casting means converting values from one data type to
other data type.For example to convert the int values to
float type vlaues.
Types of casting:
1. Downcasting -source is larger than destination type
2. upcasting - Source is smaller than destination type.
casting can be applicable to both primitive type and Object
type.
primitive type - convert numeral to floating point and vice
versa.
Object type - converting from subclass to super class or
vice versa.
superClassObj = subClassObj;
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
When do you call copy constructor?
In a container there are 5 components. I want to display all the component names, how will you do that?
What are java packages? What is the significance of packages?
What is method and methodology?
How can we make string upper case or lower case?
What is difference between static and abstract class?
What does exclamation mean in java?
What is canonical name in java?
What is illegal identifier in java?
How can you make a class serializable in java?
What is the purpose of final keyword and when to use it?
Define reflection.
What is the final access modifier in java?
What is arrays aslist in java?
what is aggregation in java?