newPermissionCollection(): This method is available in java.util.PropertyPermission class of Java.
Syntax:
PermissionCollection java.util.PropertyPermission.newPermissionCollection()
This method returns a new PermissionCollection object for storing PropertyPermission objects.
Parameters: NA
Returns: a new PermissionCollection object suitable for storing PropertyPermissions.
Exceptions: NA
Approach
Java
import java.util.PropertyPermission;public class PropertyPermissionnewPermissionCollection {public static void main(String[] args) {PropertyPermission propertyPermission =new PropertyPermission("Hello", "read");System.out.println(propertyPermission.newPermissionCollection());}}
Output:
java.util.PropertyPermissionCollection@7637f22 (
)
No comments:
Post a Comment