Question: Implement the method isEqual() to check if two Strings match. Do not use == operator to compare the two Strings directly. String inputs are case

Implement the method isEqual() to check if two Strings match. Do not use == operator to compare the two Strings directly. String inputs are case sensitive. 

public class String Equal { public static void main(String[] args) { }

public class String Equal { public static void main(String[] args) { } 1 System.out.println("false == " + is Equal("LIFEISGOOD", "lifeisgood")); System.out.println("true == " + is Equal("lifeisgood", "lifeisgood")); System.out.println("false == " + is Equal("life is good", "lifeisgood")); public static boolean is Equal(String text1, String text2) { TODO check if two Strings text1 and text2 equal in value. Do not use the operator. The texts are case sensitive.

Step by Step Solution

3.43 Rating (143 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image you provided contains a template for a Java class called StringEqual In this class there i... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction Java Program Questions!