-->
当前位置:首页 > 题库

单选题:下面代码的输出的结果是()。

Luz5年前 (2021-05-10)题库1537
下面代码的输出的结果是()。 @[D](1)
class Person
{ static String country="A城市" ;
}
public class Test
public static void main(String args[])
{
Person p1=new Person();
Person p2=new Person();
p1.country="B城市";
p2.country="C城市";
System.out.println(p1.country);
System.out.println(p2.country);
}
}

A. B城市
C城市
B. B城市
B城市
C. A城市
C城市
D. C城市
C城市







A.B城市
C城市
B.B城市
B城市
C.A城市
C城市
D.C城市
C城市


答案:D