You are viewing a single comment's thread. Return to all comments →
This worked for me
for(char c : "abcdefghijklmnopqrstuvwxyz".toCharArray())
{ if(firstWord.indexOf(c) > -1 && secondWord.indexOf(c) > -1) flag = "YES"; } corrected as per suggestion by @rkbansal83
Seems like cookies are disabled on this browser, please enable them to open this website
Two Strings
You are viewing a single comment's thread. Return to all comments →
This worked for me
for(char c : "abcdefghijklmnopqrstuvwxyz".toCharArray())