Question: 5 . 2 5 LAB: Longest string ( EO ) Write a method, findLongest 0 , that takes two strings as parameters and returns the

5.25 LAB: Longest string (EO)
Write a method, findLongest 0, that takes two strings as parameters and returns the longest string. If the strings are the same length then return the second string.
Ex. If the input is:
almond pistachio
the method findLongest() returns and then the program outputs:
pistachio
Your program must define the following method:
public String findLongest(String str1, String str2)
5421523526748 qx329y?
 5.25 LAB: Longest string (EO) Write a method, findLongest 0, that

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 Databases Questions!