為什么不行
public class HelloWorld{
? ? public static void main(String[] args) {
final char sex='男';
final ? char pp='女';
System.out.println(sex+pp);
}
}
public class HelloWorld{
? ? public static void main(String[] args) {
final char sex='男';
final ? char pp='女';
System.out.println(sex+pp);
}
}
2018-09-09
舉報(bào)
2018-09-21
程序沒(méi)問(wèn)題,不過(guò)最后輸出的是ASCII碼的值.
2018-09-10
漢字占兩個(gè)字符,char只能存放一個(gè)
2018-09-09
輸出錯(cuò)誤
public class HelloWorld{
? ? public static void main(String[] args) {
? ? ? ? final char MALE='男';
? ? ? ? final char FEMAL='女';
? ? ? ? System.out.println(MALE);
? ? ? ? System.out.println(FEMAL);