Vidyalelo
Java Programming · Q6

Declaration and Access Control

Programming · Java Programming · question 6

Q6

In Java, which access modifier allows a method or variable to be accessed within the same package only?

A.
private
B.
public
C.
protected
D.
package-private
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board