public class HelloWorld{
public static void main(String[] args) {
final String MAN="男";
final String FEMAN="女";
System.out.println=("张三的性别":MAN);
System.out.println=("小红的性别"FEMAN);
}
}
输出语句有字符串和变量,应该用连接符+连接起来。括号外面不需要加=
System.out.println("张三的性别"+MAN); System.out.println("小红的性别"+FEMAN);