how many access specifiers are available in java

Answers were Sorted based on User's Feedback



how many access specifiers are available in java..

Answer / manikandan

There are 4 access specifiers available , they are
(1) Public
(2) Protected
(3) Default
(4) Private

and their scopes are

Access|Scope|
Speci | |CLASS | SUBCLASS | PACKAGE |GLOBAL
--------------------------------------------------------------
PUBLIC YES YES YES YES

PROTECTED YES YES YES NO

DEFAULT YES YES NO NO

PRIVATE YES NO NO NO

Is This Answer Correct ?    6 Yes 9 No

Post New Answer

More Core Java Interview Questions

What is a finally block? Is there a case when finally will not execute?

0 Answers  


When throw keyword is used?

0 Answers  


what is difference between set and list in collection?

3 Answers   Satyam,


what is the use/perpose of having a method antive?

2 Answers  


Can It is possible to synchronize the constructor of a Java Class?

0 Answers  


How the metacharacters are different from the ordinary characters?

0 Answers  


What is collections framework?

0 Answers  


How many types of keywords are there?

0 Answers  


What are some alternatives to inheritance?

0 Answers  


Can we override static methods?

18 Answers   Bally Technologies,


What are the skills required for core java?

0 Answers  


What is an array in java?

0 Answers  


Categories