how many access specifiers are available in java

Answer Posted / gyana

there are four access specifier in java.they are

public - means the the properties of class is accessable
to all other classes.
private- means the the properties of class cannot
accessable to any other classes.
protected- means the properties of class will acessed only
to its subclasses,not subclasses of its subclasses.
no access - mean you can access it with in the class.

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between length and length () in java?

713


What is called module?

750


What are the 8 primitive data types in java?

754


What is a stack class in java ?

827


Explain differences between collection api and stream api?

830


Tell some latest versions in JAVA related areas?

749


What about features of local inner class?

825


What are drawbacks of singleton class?

700


What is the point of java?

755


What purpose do the keywords final, finally, and finalize fulfill?

852


Why do we override tostring method in java?

676


Is ruby built on java?

709


What are the different ways of implementing thread? Which one is more advantageous?

733


Which command from the jdk compiles a java program?

661


What are java threads?

835