Page 1 of 1

About Question enthuware.ocajp.i.v8.2.1440 :

Posted: Sun Apr 12, 2015 10:42 am
by Patrick75
The explanation given with this question, belongs to another question:
If you just consider the method getSwitch, any of int long float or double will do. But the return value is used in the switch statement later on. A switch condition cannot accept float, long, double, or boolean. So only int is valid. The return type cannot be byte, short, or char because the expression x - 20/x + x*x; returns an int.

Re: About Question enthuware.ocajp.i.v8.2.1440 :

Posted: Sun Apr 12, 2015 9:26 pm
by admin
Fixed.
thank you for your feedback!