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
How do you escape a string?
Define how does a try statement determine which catch clause should be used to handle an exception?
What is proper subset?
Print Vertical traversal of a Binary Tree.
What do you mean by local variable and instance variable?
How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?
Name component subclasses that support painting in java programming?
What do you mean by compiler?
How to sort array in descending order in java?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
Can inner class extend any class?
Is string is a data type in java?
Is null a string in java?
What is class array in java?
What is e java?