public boolean frontAgain(String str) { if (str.length() < 2) { return false; } String first2 = str.substring(0,2); return str.endsWith(first2); }