Necesitamos tu apoyo para difundir nuestras reseñas con relación a las ciencias informáticas.
Ejemplo 1: actualización de java
Upcasting is casting a subtype toa supertype,
going up in the inheritance tree.
It is done implicitly
in order touse method available on any
interface/class, the object should be of
same class or of class implementing the interface.
WebDriver driver =newChromeDriver();
or
TakeScreenShot ts =newChromeDriver();
Ejemplo 2: upcasting vs downcasting en java
Upcasting is casting a subtype toa supertype,
going up in the inheritance tree.
It is done implicitly
in order touse method available on any
interface/class, the object should be of
same class or of class implementing the interface.
WebDriver driver =newChromeDriver();
or
TakeScreenShot ts =newChromeDriver();Downcasting is casting toa subtype,
going down in the inheritance tree.
It is done toaccess sub classfeatures.
It has tobe done manually
(TakeScreenShot)driver).takeScreenShot();
Sección de Reseñas y Valoraciones
Ten en cuenta compartir este enunciado si te ayudó.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)