Written by the Fiveable Content Team โข Last updated August 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated August 2025
Definition
The .equals(String string) method is used to compare two strings for equality. It checks if both strings have exactly the same characters in the same order.