publicclassA{2.publicvoidmethod1()
1.publicclassA{
2.publicvoidmethod1(){
3.Bb=newB();
4.b.method2();
5.//morecodehere
6.}
7.}
1.publicclassB{
2.publicvoidmethod2(){
3.Cc=newC();
4.c.method3();
5.//morecodehere
6.}
7.}
1.publicclassC{
2.publicvoidmethod3(){
3.//morecodehere
4.}
5.}
Given:
25.try{
26.Aa=newA();
27.a.method1();
28.}catch(Exceptione){
29.System.out.print(”anerroroccurred”);
30.}
WhichtwoaretrueifaNullPointerExceptionisthrownonline3ofclassC?()
时间:2024-01-18 10:06:12
相似题目