62,620
社区成员
发帖
与我相关
我的任务
分享
public class Test1 {
public static void changeStr(String str) {
str = "welcome";
}
public static void main(String[] args) {
String str = "1234";
changeStr(str);
System.out.println(str);
}
}
public class Test
{
private int i=getValue();//第2行
private int j = 10;
int getValue(){
return j;
}
public static void main(String[] args) {
System.out.print(new Test().i);//第9行
}
}
求解释这个程序的输出结果