What does that mean? The length of the string is too long or there is error in my code?

```
  public class Program {
        public static String flipEndChars(String s) {
            if(s.charAt(0) == s.charAt(s.length())){
                return "Two's a pair.";
            }
            else if(s.length()<3){
                return "incompatible";
            }
            else 
                return s.charAt(s.length()) + s.substring(1,s.length()) + s.charAt(0);
        }
    }

```