Which access level modifier allows a method in a class to be accessible only by other classes within the same package?

Choose the correct answer

Explanation

If a method is declared without any explicit access modifier, it has package-private access by default, meaning it is accessible only to classes within the same package. Declaring a method as public makes it accessible from any class, while private restricts access to within the declaring class only. Combining public and private is invalid.

Which access level modifier allows a method in a cla… — Java concepts and its programming | PakQuizHub