Given the following code what will be output?
public class Pass{
static int j=20;
public static void main(String argv[]){
int i=10;
Pass p = new Pass();
p.amethod(i);
System.out.println(i);
System.out.println(j);
}
public void amethod(int x){
x=x*2; j=j*2;
}}
发布于 2021-02-15 03:24:31
【单选题】 A Error: amethod parameter does not match variable B 20 and 40 C 10 and 40 D 10 and 20