CompoundName toString() method in Java with Examples
The toString() method of a javax.naming.CompoundName class is used to create the string representation of this compound name object, using the syntax of the compound name which was passed through properties. if the component is empty then it is represented by an empty string. The string representation of non-empty compound name object created has the same syntax properties and all the components are separated by that syntax in string representation.
public String toString()
Parameters: This method accepts nothing.
Return value: This method returns a non-null string representation of this compound name.
Below programs illustrate the CompoundName.toString() method:
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.