以下代码的输出结果为( )。Public class Pass{Static int j = 20;Public void amethod(int x){X = x*2;J = j*2;}Public static void main(String args]){Int i = 10;Pass p = new Pass();P.amethod(i);System.out.println(i+" and "+j);}}(2分)
选项:
A:错误:方法参数与变量不匹配
B:20 and 40
C:10 and 40
D:10 and 20
发布时间:2024-04-02 23:53:58