SHARE
TWEET

Untitled

a guest Apr 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public boolean endOther(String a, String b) {
  2.   a = a.toLowerCase();
  3.   b = b.toLowerCase();
  4.   boolean flag = false;
  5.  if(a.equals(b)){
  6.    return true;
  7.    
  8.  }
  9.  if(a.length()==0)
  10.  return false;
  11.  if(b.length()==0)
  12.  return false;
  13.  if(a.length()>=b.length() && a.indexOf(b) == a.length()-b.length())
  14.    return true;
  15.   if(b.length()>=a.length() && b.indexOf(a) == b.length()-a.length())
  16.    return true;
  17.   return flag;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top