为什么我的电脑在使用String(char [] ch)代码时发出嘟嘟声?
问题描述:
我使用JCreator的,它编译罚款,但在运行代码为什么我的电脑在使用String(char [] ch)代码时发出嘟嘟声?
class StringDemo {
public static void main(String[]args){
char[]arr={7};
String s1= new String(arr);
System.out.println(s1); //prints nothing
}
}
该特定字符必须发出噪音:) – notyou
不一定。在我的笔记本电脑上,它只是打印没有声音的Unicode替换字符 。 –
尝试'char [] arr = {'7'};' – Naxos84