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 is the difference between interface & abstract class?
How to compare strings in java?
What is double word?
why we need this (1.object,2.class,3.data hiding,4.encapsulation,5.abstraction,6. polymorphism,7.inheritance)
What is the main use of generics in java?
What is the order of arraylist in java?
What are the latest versions in JAVA related areas?
Explain super keyword in java.
what is main difference b/w abstract class and interface
What is == and === in javascript?
What's the difference between comparison done by equals method and == operator?
What is run time allocation?