What are different types of access modifiers?

Answer Posted / nani

Private : It can access with in the class only
public :It can Access Any where in java program
proteced:It can access with in the package and sub class of
the package also
default:it access with in the java program.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which list is sorted in java?

585


What are the pillars of java?

490


what is collatration?

2745


What does || || mean in math?

517


Is array passed by reference in java?

582






What is garbage collection? Can it be forced to run?

543


What's the difference between comparison done by equals method and == operator?

548


what is thread? What are the high-level thread states? : Java thread

793


Can you override private or static method in java?

555


What is string made of?

531


Is hashmap thread safe?

562


What is the difference between post and put?

538


Can an interface implement another interface?

577


Implement a stack with push (), pop() and min() in O(1) time.

638


What is math exp in java?

548