Section 4.4.7 Check Point Questions2 questions 

4.4.7.1
Suppose that s1, s2, and s3 are three strings, given as follows:
String s1 = "Welcome to Java";
String s2 = "Programming is fun";
String s3 = "Welcome to Java";
What are the results of the following expressions?
a.	s1 == s2
b.	s2 == s3
c.	s1.equals(s2) 
d.	s1.equals(s3) 
e.	s1.compareTo(s2) 
f.	s2.compareTo(s3) 
g.	s2.compareTo(s2) 
h.	s1.startsWith("Welcome") 
i.	s1.endsWith("Welcome") 
j.	s1.contains("Java") 
k.	s1.equalsIgnoreCase("java")            
4.4.7.2
Let s1 be " Welcome " and s2 be " welcome ". Write the code for the following statements:
a. Check whether s1 is equal to s2 and assign the result to a Boolean variable isEqual.
b. Check whether s1 is equal to s2, ignoring case, and assign the result to a Boolean variable isEqual.
c. Compare s1 with s2 and assign the result to an int variable x.
d. Compare s1 with s2, ignoring case, and assign the result to an int variable x.
e. Check whether s1 has the prefix AAA and assign the result to a Boolean variable b.
f. Check whether s1 has the suffix AAA and assign the result to a Boolean variable b.