What are access modifiers in Java ?
Answers were Sorted based on User's Feedback
we have 4 access modifiers in java.
public
private
protected
default
Is This Answer Correct ? | 14 Yes | 5 No |
Answer / ravikiran(aptech mumbai)
Access modifiers species the scope of the access of a
particular variable or method
1).public
2).protected
3).private
4).default
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / surendrareddy
The access specifiers in java are
1.public
2.private
3.protected these are control access specifiers in java
The another one is "Default" it will available when we will
not mention above 3 access specifiers before the class variable
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / madhu
public
static
final
volatile
transient
native
synchronized
Is This Answer Correct ? | 5 Yes | 11 No |
If a variable is declared as private, where may the variable be accessed?
What is an Applet ?
Explain illegalmonitorstateexception and when it will be thrown?
What does || mean in vectors?
In a container there are 5 components. I want to display all the component names, how will you do that?
What must a class do to implement an interface in java programming?
What exactly is methodology?
Explain in detail about encapsulation with an example?
What is the difference between declaration and definition in java?
Is integer passed by reference in java?
Tell some latest versions in JAVA related areas?
what is an object and how do you allocate memory to it?