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.
About Question enthuware.ocajp.i.v8.2.1440 :
Moderators: Site Manager, fjwalraven
-
- Posts: 4
- Joined: Sun Apr 12, 2015 10:34 am
- Contact:
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.1440 :
Fixed.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 2 guests