Answer Posted / sumit pal singh
In java there are four type of access modifier.
1.private:It is accessible only within the class.
2.default:If you don't use any modifier then it is treated as default bydefault .it is accessible within package.
3.protected:The protected access modifier is accessible within package and outside the package but through inheritance only.
4.public:The public access modifier is accessible everywhere. It has the widest scope among all other modifiers.
The access Modifier in java specify the scope of data member,method,constructor and class.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Where is jre installed?
Can a lock be acquired on a class in java programming?
What is a conditional statement explain with example?
What is a flag value?
Can static method access instance variables ?
What is super?
How a variable is stored in memory?
If I only change the return type, does the method become overloaded?
What are the four corner stones of oop?
What are instance variables?
Does java initialize arrays to zero?
What is command line argument in java?
what are Hostile Applets?
How do I know if java is installed?
Why collection is called framework in java?