What should be the return type of the following method?
public ___ methodX ( byte by){ double d = 10.0; return (long) by/d*3; }
Select 1 option
Correct Option is : C
The cast (long) applies to 'by' not to the whole expression.
((long)by)/d*3;
Division operation on long gives you a double.
So the return type should be double.