Java
Which acce ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Which access modifiers allow access to the field/method of a public class to other classes that are in the same package?
public
protected
default (package-private)
private
Explanation
Public, private and default (package-private) access modifiers allow other classes in the same package to access methods and fields of a class
public, private, protected
access modifiers
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
There are two classes: package pak1; import pak2.B; pub...
Is it possible to refer to a private method of some class from another instance ...
What will happen as the result of the following code compilation? ...
Which line will the first compilation error occur in? p...
What is the result of the following code compilation and execution? ...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment