Which statement is true for the class First given below?
package myPackage:
class First
{
/* class body *
}
a. first class is accessible to all classes defined inside or outside my package.
b. first class is accessible to classes within my package.
c. first class is not accessible to any other class
d. first class is accessible to its subclasses defined inside or outside my package
which option is right?
Answers
Answered by
6
Answer:
the first class is not accessible to any other class
Answered by
2
b. first class is accessible to classes within my package.
Explanation:
It is because the access specifiers are not specified.
The default access specifier is package-private, which means the class and the member functions are accessible within the specified package.
Access specifiers outline how the attributes and methods of a category may be accessed.
In public - participants are on hand from out of doors the elegance.
Access Modifiers in a category are used to assign the accessibility to the elegant participants.
Similar questions