how many access specifiers are available in java

Answer Posted / anjani kumar jha

There are four access specifiers are available in java

Public-----------access to all

Private---------limited to class only

Protected---------limited to sub package of class

Default------------limited to same package

Is This Answer Correct ?    52 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a generic type?

752


Explain importance of inheritance in java?

772


What is polymorphism java example?

756


what is mutual exclusion? : Java thread

760


What do you mean by chromounits in java8?

706


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

726


Can we declare a static variable inside a method?

733


How do we access static members in java?

827


How big is a pointer?

751


How do you sort arraylist in descending order?

760


What is use of map in java?

728


can rmi and corba based applications interact ?

837


Should database connections be singleton?

747


Explain a situation where finally block will not be executed?

759


What is the purpose of format function?

833