Skip Top Navigation Bar

Creaing a new String with the Case Changed

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.

String toLowerCase() & String toUpperCase()

String toLowerCase()

This method creates a new String where all uppercase letters of this String have been converted to lowercase letters.

String toUpperCase()

Similar to the method toLowerCase, but the method creates a new String where all lowercase letters of this String have been converted to uppercase letters.

Your Turn

Let's try it in the Java Playground.

Complete List of String Learn Tutorials

Resources

Next Learn Tutorial