final String Male="男"; final String Female="女"; System.out.println("Male"); System.out.println("Female"); 为什么输不出来?
输出语句那里不应该再用双引号包裹
public class HelloWorld{ public static void main(String[] args) { final String MALE = "男"; final String FEMALE = "女"; System.out.println(MALE); System.out.println(FEMALE); } }
求采纳求采纳
System.out.println("Male"); 要把双引号去掉
System.out.println(Male);变量名不要使用引号,否则输出的就不是你给变量的赋值了