Other Methods of String

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   hear noise   go to next page

Answer:

Yes.

Other Methods of 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.

QUESTION 14:

Do any of these methods change the String that contains them?