How can a class be accessed, If no access modifiers are
declared?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
If a class is marked with no access modifiers then it is
given "package" access by default which means it can be
instantiated or subclasses by other classes in the same
package but it is inaccessible to classes outside the same
package.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
the default access will be resticted to the classes with in
the same package
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / babu
If a there is no access modifier specified to a class then it
takes the access modifier as Default modifier.Default Access modifier scope is package scope.so this class scope also package scope to access the classes which is having in the same package.
| Is This Answer Correct ? | 0 Yes | 0 No |
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
What is a Null object?
How do you do descending order in java?
Difference between a MenuItem and a CheckboxMenuItem?
What does this() represent, and how is it used in Java?
what is deadlock? : Java thread
Explain the difference between association, aggregation and inheritance relationships.
What is the default initialized value of a boolean type variable?
Can we call thread start () twice?
What is a variable declaration?
How transient variable is different from volatile variable?
What is difference between == and === in js?