изначально написал в методе такое:
public String toString() {

           if (mother == null & father == null)
              return "The cat's name is " + name + ", no mother, no father ";

           if (mother == null & father != null)
               return "The cat's name is " + name + ", no mother, father is " + father;

           if (mother != null & father == null)
               return "The cat's name is " + name + ", mother is " + mother + ", no father";

           if (mother != null & father != null)
               return "The cat's name is " + name + ", mother is " + mother + ", father is " + father;

       }
и почему-то не компилит так, пишет "missing return statement", но как бы return есть в каждом if. Можно подумать что ни один if не true - но вроде же все варианты описаны в четырёх if -ах. После заменил код метода на тот, что в примере ниже(менее наглядный и выглядящий менее красиво) и всё заработало. Почему не работает первый вариант?