Question: Consider the following class package uk.ac.rhul.mypackage; public class MyClass { private String s; protected int x; int y; public double foo() { I/ Some code
Consider the following class package uk.ac.rhul.mypackage; public class MyClass \{ private String s; protected int x; int y; public double foo() \{ I/ Some code here \} Select all the correct statements about the visibility of its instance variables and methods: Select one or more: a. The variable is not visible to subclasses of that belong to the default package b. The method is not visible outside the package c. The variable is visible to all classes in the package d. The variable is visible to any subclasses of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
