What will happen when you try compiling and running this code?
public class Ref{
public static void main(String argv[]){
Ref r = new Ref();
r.amethod(r);
}
public void amethod(Ref r){
int i=99; multi(r);
System.out.println(i);
}
public void multi(Ref r){
r.i = r.i*2;
}}
发布于 2021-02-15 03:24:44
【单选题】
A Error at compile time
B An output of 99
C An output of 198
D An error at runtime
查看更多
- 体验AI问答!更聪明、超智能!
- 一款基于GPT的超级AI助手,可以对话、创作、写文案!