Skip Top Navigation Bar

Comparing String Objects with equals Methods

String Methods

We've compiled some helpful String methods below.

Methods that are part of the AP Computer Science A Java subset are denoted by the APCSA label.

A complete list of String methods can be found in the String API.

boolean equals(Object anObject)

This method returns

Your Turn

Let's try it in the Java Playground.

boolean equalsIgnoreCase(String anotherString)

This method is similar to the equals method, but doesn't distinguish between uppercase and lowercase letters.

This method returns

Your Turn

Let's try it in the Java Playground.

Complete List of String Learn Tutorials

Resources

Next Learn Tutorial