1//This expression is true if str1 and str2 are equal, and false if they're not
2str1.equals(str2)
3
4//example use case:
5String location = "London";
6String destination = "London";
7if (location.equals(destination)) {
8 System.out.println("You have arrived!");
9}