多选题
Given the following line of code, which of the lines of code listed are incorrect? (Choose all that apply.)
char c;
A. c = new char();
B. c = 'Y';
C. c = '/u0056';
D. c = "Yes";
A
B
C
D
【正确答案】
A、D
【答案解析】
A是正确答案,因为new关键字不能用于基本数据类型char。D是正确答案,因为char不能存储一个字符串。B和C不是正确答案,因为两行都是有效的代码行。
提交答案
关闭