How can a class be accessed, If no access modifiers are
declared?
Answer Posted / 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 |
Post New Answer View All Answers
Explain what access modifiers can be used for variables?
Can a class be declared as static?
What about anonymous inner classes in java?
What methodology can be employed to locate substrings inside a string?
What invokes a thread's run() method in java programming?
What is difference between next () and nextline () in java?
You're given a Boolean 2D matrix, can you find the number of islands?
How many types of voids are there?
Is null an object java?
what is the difference between the methods sleep() and wait()? : Java thread
Explain illegalmonitorstateexception and when it will be thrown?
Explain about member inner classes?
What do you mean by garbage collection used in java?
What is a text string?
Explain inheritance in java?