问答详情
源自:2-11 Java常量的应用

我想说错在哪里了

public class HelloWorld{

    public static void main(String[] args) {

final String MALE="男";

final String FEMALE="女";

    System.out.pintln("MALE"+SEX);

System.out.println("FEMALE"+SEX)

}

}


提问者:慕瓜0275119 2016-05-31 19:34

个回答

  • amorlova
    2016-06-01 16:28:25

    System.out.println("sex"+MALE);System.out.println("sex"+FEMALE);

  • 流浪南方的雪
    2016-05-31 22:14:45

    public class HelloWorld{

        public static void main(String[] args) {

    final String MALE="男";

    final String FEMALE="女";

        System.out.println("MALE:"+MALE);

        System.out.println("FEMALE:"+FEMALE);

    }

    }


  • qq_弑神S无尘
    2016-05-31 19:56:43

    逗比。sex没定义,;没加

  • 人生不言弃
    2016-05-31 19:46:03

    package ex1;


    public class Helloword {

    public static void main(String[] args){

    final String MALE="男";

    final String FEMALE="女";

    System.out.println(MALE);

    System.out.println(FEMALE);}

    }

    你SEX没定义

  • _风筝_3413559
    2016-05-31 19:42:12

     System.out.pintln("MALE"+SEX);            应为println

    System.out.println("FEMALE"+SEX)           句尾要分号

    }


  • _风筝_3413559
    2016-05-31 19:41:07

    .pintln  你这里单词拼错了

  • 人生不言弃
    2016-05-31 19:38:34

     System.out.println("MALE"+SEX);