OOPs
OOPs
OOPs
Boolean return True or False value so converting true in to false and vice versa are
not possible hence java doesn’t support the Boolean casting.
b) Non primitive casting::
Def ::To convert the one type of class(User defined class) in to another type of class
is known as non-primitive type of casting.
1_Upcasting:: To acquire the sub class properties in to super class is called as
upcasting.
-We have to perform the inheritance operation between two classes before perform
form upcasting operation on it.
-At the time of upcasting the properties which are inhered from the super class are
only eligible for the operation & the new or extra properties which are added or
declare inside the sub class are not eligible for upcasting.
-While performing the upcasting the object orientation get change,
Syntax-- > Parent p = new child ();
Ex- super class= father class
Sub class= son class
Father s = new son ();
-