PropertyPermission toString() in Java

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

Syntax:

String java.security.Permission.toString()

This method returns a string describing this Permission.

Parameters: NA

Returns: information about this Permission.

Exceptions: NA

Approach

Java

import java.util.PropertyPermission;

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

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

    }
}

Output:

("java.util.PropertyPermission" "Hello" "read")


No comments:

Post a Comment