這個(gè)打印輸出的方式再有別的寫(xiě)法嗎?求賜教
public class HelloWorld{
? ? public static void main(String[] args) {
final char MALE='男';
final char FEMALE='女';
System.out.println(""+MALE+FEMALE);
}
}
public class HelloWorld{
? ? public static void main(String[] args) {
final char MALE='男';
final char FEMALE='女';
System.out.println(""+MALE+FEMALE);
}
}
2017-12-16
舉報(bào)
2018-01-13
public class HelloWorld {
public static void main(String[] args) {
final char MALE = '男';
final char FEMALE = '女';
System.out.println( MALE +"\n"+ FEMALE);
}
}
這樣也可以
2017-12-17
弱弱問(wèn)一下,
前面那個(gè)引號(hào)什么意思?
2017-12-16
public class HelloWorld{
? ? public static void main(String[] args) {
final char MALE='男';
final char FEMALE='女';
System.out.println(""+MALE);
System.out.println(""+FEMALE);
}
}