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 |
What are features of java?
What is :: operator in java 8?
What Method and class used for Connection pooling ?
What is xslt in java?
Is minecraft 1.15 out?
Define immutable object?
What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose.
2 Answers Infosys, Tech Mahindra,
What is object-oriented programming?
What is java basic concept?
What is an class?
What does g mean in regex?
What is a generic type?