首页 > 试题广场 >

阅读以下程序,写出输出结果。

[问答题]

阅读以下程序,写出输出结果。

public class Foo {
public static void main (String [] args) {  
StringBuffer a = new StringBuffer (“This is in SCUT”);
StringBuffer b = new StringBuffer (“Twice”);
operate(a,b);
System.out.printIn(a + “,” +b);
}
static void operate (StringBuffer x, StringBuffer y) {
        x.append(y);
y = x;
}
}

This is in SCUTTwice,Twice



发表于 2017-05-17 16:37:43 回复(0)