单项选择题
Which of the following range of short is correct?()
A. -27 -- 27-1
B. 0 -- 216-1
C. -215 -- 215-1
D. -231 -- 231-1
相关考题
-
多项选择题
The8859-1charactercodefortheuppercaseletterAis65.Whichofthesecodefragmentsdeclareandinitializeavariableoftypecharwiththisvalue?()
A.char ch = 65;
B.char ch = ’¥65’;
C.char ch = ’¥0041’;
D.char ch = ’A’;
E.char ch = "A"; -
多项选择题
Given the following code, which method declarations, when inserted at the indicated position, will not cause the program to fail compilation?() public class Qdd1f { public long sum(long a, long b) { return a + b; } // insert new method declaration here }
A.public int sum(int a, int b) { return a + b; }
B.public int sum(long a, long b) { return 0; }
C.abstract int sum();
D.private long sum(long a, long b) { return a + b; }
E.public long sum(long a, int b) { return a + b; } -
多项选择题
Whichstatementsconcerningcastingandconversionaretrue?()
A.Conversion from int to long does not need a cast.
B.Conversion from byte to short does not need a cast.
C.Conversion from float to long does not need a cast.
D.Conversion from short to char does not need a cast.
E.Conversion from boolean to int using a cast is not possible.
