downcasting in java
Downcasting is casting to a subtype,
going down in the inheritance tree.
It is done to access sub class features.
It has to be done manually
(TakeScreenShot)driver).takeScreenShot();
downcasting in java
Downcasting is casting to a subtype,
going down in the inheritance tree.
It is done to access sub class features.
It has to be done manually
(TakeScreenShot)driver).takeScreenShot();
upcasting vs downcasting in java
Upcasting is casting a subtype to a supertype,
going up in the inheritance tree.
It is done implicitly
in order to use method available on any
interface/class, the object should be of
same class or of class implementing the interface.
WebDriver driver = new ChromeDriver();
or
TakeScreenShot ts = new ChromeDriver();
Downcasting is casting to a subtype,
going down in the inheritance tree.
It is done to access sub class features.
It has to be done manually
(TakeScreenShot)driver).takeScreenShot();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us