The ________ class in Java creates an immutable sequence of characters.

  • CharArray
  • String
  • StringBuffer
  • StringBuilder
In Java, the String class creates an immutable sequence of characters. This means that once a string is created, its content cannot be changed. The other options, StringBuilder, StringBuffer, and CharArray, are used for mutable character sequences.
Add your answer
Loading...

Leave a comment

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