Which method converts a given string to a sequence of characters?

  • charAt()
  • split()
  • toCharArray()
  • toString()
The toCharArray() method in Java's String class converts a given string into an array of characters, providing a sequence of characters. The other methods do not perform this specific task.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *