Question: Where will you see errors in the following code: (Select only 3) A.java X 1 package test; 2 3 public class A { 4

 Where will you see errors in the following code: (Select only 3)  

Where will you see errors in the following code: (Select only 3) A.java X 1 package test; 2 3 public class A { 4 private int i; 5 60 7 8 9 100 11 12 13 14 15} 16 int j; int A() { } void changeVal() { i = i*j; return i: } i=2; j=5; *B.java X 1 package newpack; 2 3 import test.A; 4 5 public class B { B() { 60 7 8 9 10 } 11 } OB.java: Line 8: can not call 'default' access member in another package OA.java: Line 12: can not return in void method OA.java: Line 6- constructor can not return OA.java: Line 11: can not update private member 'i' OB.java: Line 3: can not import class A OB.java: Line 7: can not create object in a different package A a1 = new A(); al. changeVal();

Step by Step Solution

3.55 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Bjava Line 3 cannot import class A Explanation The import statement in Bjava is trying to import c... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!