posted 23 years ago
What is the default access specifier for a class?
There is no no default access specifier ie if you want the class to have default access, then while defining the class, do not precede the class with any(private, protected and public) access modifier.
example:
class Test{}// This class has default access
If the class is having a default access, the class's default feature is accessible to all the classes in the same package but not accessible to classes in the different package, even the subclass in different package cannot access the default feature.
Hope this helps!