Answered step by step
Verified Expert Solution
Link Copied!

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions