JAVA Programming :: Basic Concepts - Discussion
10 / 64
package test;
class Target {
public String name = "hello";
}
package test;
class Target {
public String name = "hello";
}
Aany class
Bonly the Target class
Cany class in the test package
Dany class that extends Target
Show Explanation
Now, the features of a class with default access specifier is-
1. It can be accessed by same package subclass.
2. It can be accessed by same package non-subclass.
Apart from this, no other subclass or non-subclass of some other packages can access this class.
Asked In ::
First of all, the class is default access specifier.
Now, the features of a class with default access specifier is-
1. It can be accessed by same package subclass.
2. It can be accessed by same package non-subclass.
Apart from this, no other subclass or non-subclass of some other packages can access this class.
Read Full Answer
Report Error
Please Login First Click Here