About Question enthuware.ocpjp.v11.2.3625 :
Posted: Tue Jan 17, 2023 12:14 pm
The second option
public void setF(double f1){ this.f = (float) 2*f1; }
doesn't compile: "cannot convert from double to float"
So, the answer
"Since the parameter type is different, it is overloading not overriding"
should be corrected
public void setF(double f1){ this.f = (float) 2*f1; }
doesn't compile: "cannot convert from double to float"
So, the answer
"Since the parameter type is different, it is overloading not overriding"
should be corrected