在输出男女时,我把变量定义到main函数外面,实现不了打印,这是怎么回事?
public class HelloWorld { final String SEX1="男"; final String SEX2="女"; public static void main(String args[]){ System.out.println(SEX1); System.out.println(SEX2); } }
public class HelloWorld { final String SEX1="男"; final String SEX2="女"; public static void main(String args[]){ System.out.println(SEX1); System.out.println(SEX2); } }
2015-12-20
举报