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
Can you add null to a list java?
What is structure of java heap? What is perm gen space in heap?
Explain with example the concept of constant variable in java.
What is not thread safe?
What is the difference between integer parseint and integer valueof?
What is loop in java?
What is a numeric format?
What are default methods ?
How do you sort objects in java?
Is main is a keyword?
Is java still necessary?
How does queue work in java?
Can we clone singleton object?
What is core java used for?
Should database connections be singleton?