Search code examples
javastringcharsequence

How to convert CharSequence to String?


How can I convert a Java CharSequence to a String?


Solution

  • By invoking its toString() method.

    Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.