首页 试题广场 > 试题详情
单选题

在Java中,运行以下代码,将会在控制台输出()。
public class Test{
public static void main(String[] args) {
Test j=new Test ();
String a = new String("dog");
String b = new String("cat");
j.operate (a,b);
System.out.print(a + ","+b);
}
public void operate (String x, String y){
x = x+y; y = x;
}
}

  • A.dog,cat
  • B.dog,dog
  • C.dogcat,cat
  • D.dogcat,dog
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 80个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部