Microsoft SDK for Java

getStringValue

The getStringValue method of the RegKey class contains the following signatures.

getStringValue(String name)
getStringValue(String name,String defval)

getStringValue(String name)

Queries a string value from the registry. The name is a subkey of the current key.

Syntax

public String getStringValue(String name);

Return Value

Returns the String value contained in the subKey.

Parameters

name The subKey containing the requested value.

getStringValue(String name,String defval)

Queries a string value from the registry. The name is a subkey of the current key. If the named value does not exist in the registry, the specified default value is returned.

Syntax

public String getStringValue(String name,String defval);

Return Value

Returns the default value if the named value does not exist in the registry. Otherwise, the method returns the string value contained in the subkey.

Parameters

name The subkey containing the requested string.
defval The default value to return.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.