Java / Casting
1.
Is Dynamic casting available in Java?
for e.g. typeVariable = (Dynamic-Type) list.get(0);
2.
What is type casting in Java?
3.
Explain the different types of casting in Java.
4.
What is auto widening and explicit narrowing in Java?
5.
What is auto-up casting and explicit down casting in Java?
for e.g.
Could not find what you were looking for? send
us the question and we would be happy to answer your question.
1. Is Dynamic casting available in Java?
for e.g.
typeVariable = (Dynamic-Type) list.get(0);
No.not possible.
2. What is type casting in Java?
The conversion of data from one data type to another data type is termed as type casting. Type casting refers to changing the type of the data....
3. Explain the different types of casting in Java.
There are 2 types. Primitive casting refers to the casting between primitive data types.
4. What is auto widening and explicit narrowing in Java?
The data is implicitly casted from small sized primitive type to big sized primitive type. This is called auto-widening....
5. What is auto-up casting and explicit down casting in Java?
An object of sub class type can be automatically casted to super class type. This is called auto-up casting.