单项选择题

阅读下面的代码:class Person{void say(){System.out.print("hello");}}class Example{public static void main(String[] args){Person p1 = new Person();Person p2 = new Person();p2.say();p1.say();p2=null;p2.say();}}下列选项中,哪个是程序的输出结果?( ) A. hello B. hellohello C. hellohellohello D. hellohello抛出异常

微信扫码免费搜题