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

Explain about java sdk?

574


Can we use return in constructor?

483


What are namespaces in java?

513


When do you call copy constructor?

548


What does split function do in java?

528






What is the default value of an object reference declared as an instance variable?

529


If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?

654


What is toarray method in java?

547


How does split work in java?

526


What is an object in java and how is it created?

576


What is java used for on a computer?

497


What are functions in java?

493


What does nextint () do in java?

546


What are the java ide’s?

568


What is the difference between processes and threads?

527