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
What is dot operator?
Mention some interfaces implemented by linked list in java.
Does set allows null in java?
How do you add an arraylist to an array in java?
What do you mean by singleton class in java?
Can we use string in the switch case?
What is collection api?
Which sorting is best in java?
Is a method a procedure?
What is the difference between JDK and JVM?
Why string is immutable with example?
What is the difference between variable & constant?
How does a for loop work?
What are the java ide's? Explain
What is a variable declaration?