Microsoft SDK for Java

toString

This method of the Variant Class coerces the Variant object to a VT_BSTR and returns the coerced result. The results of the coercion are not stored in the Variant.

Syntax

public String toString();

Return Value

Returns the coerced value that is converted to a Java string.

Remarks

Unlike the other toXXX methods, no exception is thrown if the variant cannot be coerced to a string. Instead, the toString method of the Object class is called. This is because toString is also the method used for diagnostic printing of all Java objects.

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