1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (short)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?()
- A、 int
- B、 byte
- C、 long
- D、 short
- E、 float
- F、 double
正确答案:F
答案解析:有
微信扫一扫手机做题
1. public class ReturnIt { 2. return Type methodA(byte x, double y) { 3. return (short)x / y * 2; 4. } 5. } What is the narrowest valid returnType for methodA in line2?()
微信扫一扫手机做题