PropertyPermission getName() in Java

getName(): This method is available in java.util.PropertyPermission class of Java.

Syntax:

String java.security.Permission.getName()

This method returns the name of this Permission.

Parameters: NA

Returns: the name of this Permission.

Exceptions: NA

Approach

Java

import java.util.PropertyPermission;

public class PropertyPermissiongetName {
    public static void main(String[] args) {
        PropertyPermission propertyPermission =
new PropertyPermission("Hello", "read");

        System.out.println(propertyPermission.getName());

    }
}

Output:

Hello


No comments:

Post a Comment