Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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) 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
Step: 1
1 Bjava Line 3 cannot import class A Explanation The import statement in Bjava is trying to import c...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started