comparestring java

Solutions on MaxInterview for comparestring java by the best coders in the world

showing results for - "comparestring java"
Zahra
18 Mar 2020
1/*
2In Java, string equals() method compares the two given strings based
3on the data/content of the string. If all the contents of both the
4strings are same then it returns true. If any character does not match,
5then it returns false.
6*/
7
8//Syntax:
9str1.equals(str2);
10
11//Here str1 and str2 both are the strings which are to be compared.