Aniket Sahrawat
Aniket Sahrawat

Reputation: 12937

How can a package hierarchy contain another package class

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.

Upvotes: 4

Views: 161

Answers (1)

BackSlash
BackSlash

Reputation: 22233

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.

Upvotes: 9

Related Questions