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 |
What do you know about the garbage collector?
Which class should you use to obtain design information about an object
What is a vector in java?
The following program is Overloading or Overriding? public class PolymorphismEx { public int sampleMethod(int a) { return a; } public String sampleMethod(int a) { return "Is it Overloading or Overriding???"; } }
4 Answers Ness Technologies, TCS,
What is the difference between throw and throws? What is the similarity between try and throw?
Can a variable be local and static at the same time?
Which data type is class in java?
Without creating a new object, How you can retrieve a String or other object?
Difference between collection, collection and collections in java?
If your team member writes code with lots of static variables and static methods, will it cause any side effects?
Explain reverse a linked list iterative solution in java?
What are the restriction imposed on a static method or a static block of code?