Written by the Fiveable Content Team • Last updated August 2025
Verified for the 2027 exam
Verified for the 2027 exam•Written by the Fiveable Content Team • Last updated August 2025
Definition
A String method that compares two strings lexicographically and returns an integer indicating their relative order, used in AP Computer Science A for alphabetical comparison.