Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 7
What's the purpose of UPCASTING and DOWNCASTING in java..?
Help me...i can't understand the concept
2 Réponses
+ 3
i found this which is straight to the point
Upcasting is casting to a supertype, while downcasting is casting to a subtype. Upcasting is always allowed, but downcasting involves a type check and can throw a ClassCastException.
+ 6
thanx @David