Question: onsider implementing an immutable ADT called String for storing a piece of text like this ne . Of the following potential methods to implement in
onsider implementing an immutable ADT called String for storing a piece of text like this ne Of the following potential methods to implement in String, which of the following is the east appropriate for an ADT to support?
String toUpper returns a new string where all characters are upper case.
String trim returns a new string where any spaces or newlines at the beginning or end of the original string have been removed.
char getCharacters returns the array of characters that make up the string.
String concatString a returns a new string which combines the input with the existing string to create a new string.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
