Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a package hierarchy contain another package class

Tags:

java

package

I am not sure about the java.lang Hierarchy. How can it contain java.security.Permission class? Follow the link and search for java.security.Permission.

like image 542
Aniket Sahrawat Avatar asked Dec 23 '22 11:12

Aniket Sahrawat


1 Answers

It doesn't contain that class. It's there just to show that java.lang.RuntimePermission is derived from java.security.BasicPermission, which is derived from java.security.Permission.

The class contained in the java.lang package is java.lang.RuntimePermission, but that webpage shows you the full class hierarchy, even if those class are not contained in the java.lang package.

like image 67
BackSlash Avatar answered Mar 24 '23 07:03

BackSlash