The getProperty() method of java.security.Provider class is used to search for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns null if the property is not found.
public String getProperty(String key)
Parameters: This method takes the property key as parameter.
Return Value: This method returns the value in this property list with the specified key value or null if the property is not found.
Below are the examples to illustrate the getProperty() method:
value is : SHA1withDSA value is : SHA1withDSA value is : SHA1withDSA value is : Software value is : sun.security.provider.JavaKeyStore$DualFormatJKS value is : SHA value is : sun.security.provider.SHA value is : sun.security.provider.JavaKeyStore$CaseExactJKS value is : Software value is : sun.security.provider.DSA$SHA256withDSA
Trying to search for unspecified key value is : null
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.