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
Why we use methods in java?
What does || mean in vectors?
Can you call a method on a null object?
Explain methods specific to list interface?
What is the difference between the boolean & operator and the && operator in java programming?
Explain the meaning of java applet.
Explain 5 features introduced in jdk 1.7?
What is the collection interface?
Is a char always 1 byte?
Can you explain the meaning of aggregation and composition
Can you explain the private protected field modifier?
What is the order of arraylist in java?
What if I write static public void instead of public static void in java?
Explain the differences between static and dynamic variables?
What is operator overloading. Is it is supported in java?