Question: Given the following declaration of a class, which field is accessible from outside the package com.corporation.project? Select the one correct answer. (a) Field i is
Given the following declaration of a class, which field is accessible from outside the package com.corporation.project?

Select the one correct answer.
(a) Field i is accessible in all classes in other packages.
(b) Field j is accessible in all classes in other packages.
(c) Field k is accessible in all classes in other packages.
(d) Field k is accessible in subclasses only in other packages.
(e) Field l is accessible in all classes in other packages.
(f) Field l is accessible in subclasses only in other packages.
package com.corporation.project; public class MyClass { int i; } public protected private int j; int k; int 1;
Step by Step Solution
3.47 Rating (160 Votes )
There are 3 Steps involved in it
b Outside the package the member j is accessible to any class whereas the member k is accessible ... View full answer
Get step-by-step solutions from verified subject matter experts
