What is access modifiers?
Answer / 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 |
What does sprintf return?
If a class is declared without any access modifiers, where can the class be accessed?
Can a class be protected in java?
What is a locale?
there are some duplicate values in ArrayList, how U'll get that array with out duplicate?
Does variable declaration allocate memory?
Can an object subclass another object?
What is return keyword in java?
what is java
Name the methods that used to get and set the text label displayed by a Buttonobject?
Why collection doesn’t extend cloneable and serializable interfaces?
What are the types of java languages?