How do you compare two strings examples? 1 April 2022 Enpatika.com Genel str1. equals(str2); Here str1 and str2 both are the strings which are to be compared. Sizin İçin Seçtik What is the difference between == and equals () C#?