Question: Given the following code:String si = new String ( hi ) ;String s 2 = new String ( hi there ) ;String

Given the following code:String si = new String("hi");String s2= new String("hi there");String s3= s2. substring(0,1);String s4= new String("hi");Which of the following would return true?I. s1. equals(s3)II. s1== s4III. sl. equals(s4)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!