No. Running the String
's method does not change the String
.
String
There are many String
methods.
The following list contains just a few.
For the complete list, and for more detailed descriptions,
see your documentation (on your hard disk or on the web).
public char charAt( int index ) public String concat( String str ) public boolean endsWith( String suffix ) public boolean equals( Object anObject ) public boolean equalsIgnoreCase( String anotherString ) public int indexOf( int ch ) public int indexOf( String str ) public int length() public boolean startsWith( String prefix ) public String substring( int beginIndex ) public String substring( int beginIndex, int endIndex ) public String toLowerCase() public String toUpperCase() public String trim()
Some of these methods are described in the exercises and in future chapters.
Do any of these methods change the String
that contains them?