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