在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