最新回答 / 哈利路亚F
你是不是两个char类型的一起输出了。就是这样:final char sex1='男';final char sex2='女'; System.out.println(sex1+sex2);这样输出的结果是52906,两个char类型变量相加转换成int类型了。可以再加一个空格System.out.println(sex1+" "+sex2);这样输出的就是字符串类型,结果是: 男 女
2016-02-23
最赞回答 / Ghostless
int count=0;//初始值下标 for (int score:scores) { System.out.println(score); count++;//循环一次下标志+1 } System.out.println("下标为:"+count);
2016-02-23
已采纳回答 / 心滕thy
public class HelloWorld{ public static void main(String[] args) { String c ="我爱慕课网"; String t ="www.imooc.com"; System.out.println(c); System.out.println(t); }}
2016-02-22