Is there a quick way to select the longest of three strings (s1,s2,s3) using if/else method?
I have tried using something like this
if (s1.length() > s2.length()) { System.out.println(s1); ...
but did not get it right.
Aucun commentaire:
Enregistrer un commentaire