+ 1

Why we use upcasting in java ??

24th Mar 2018, 7:28 PM
Rajan Singla
Rajan Singla - avatar
5 Respostas
+ 1
Upcasting is done automatically by Java.
25th Mar 2018, 11:09 AM
TurtleShell
TurtleShell - avatar
+ 1
can you elaborate why we use it ??
25th Mar 2018, 11:28 AM
Rajan Singla
Rajan Singla - avatar
+ 1
You mean why does Java do it automatically or why there’s a need for Java to do it?
25th Mar 2018, 11:30 AM
TurtleShell
TurtleShell - avatar
+ 1
Yes,my question is why we use or need upcasting in Java ?? we have also used upcasting in polymorphism ,,,,, why we have used it ??
25th Mar 2018, 11:34 AM
Rajan Singla
Rajan Singla - avatar
25th Mar 2018, 11:46 AM
TurtleShell
TurtleShell - avatar