Question: what is the difference between public private and protected classes in java?
Answer: A private member ( i ) is only accessible within the same class as it is declared. A member with no access modifier ( j ) is only accessible within classes in the same package. A protected member ( k ) is accessible within all classes in the same package and within subclasses in other packages.