Подскажите в чем проблема -
Отсутствует открывающаяся круглая скобка.
файл com/javarush/task/task06/task0621/Solution.java, строка 58, позиция 1715
package com.javarush.task.task06.task0621;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Родственные связи кошек
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String grandfatherName = reader.readLine();
Cat grandfather = new Cat(grandfatherNameб, null, null);
String grandmotherName = reader.readLine();
Cat grandmother = new Cat(grandmotherName, null, null);
String fatherName = reader.readLine();
Cat catfather = new Cat(fatherName, grandfather, null);
String motherName = reader.readLine();
Cat catMother = new Cat(motherName, null, grandmother);
String sonName = reader.readLine();
Cat catSon = new Cat(sonName, catfather, catMother);
String daughterName = reader.readLine();
Cat catDaughter = new Cat(daughterName, catfather, catMother);
System.out.println(grandfather);
System.out.println(grandmother);
System.out.println(catMother);
System.out.println(catDaughter);
System.out.println(catDaughter);
System.out.println(catSon);
}
public static class Cat {
private String name;
private Cat parentf;
private Cat parentm;
Cat(String name) {
this.name = name;
}
Cat(String name, Cat parentf, Cat parentm) {
this.name = name;
this.parentf = parentf;
this.parentm = parentm;
}
@Override
public void String toString() {
if (parentm == null && parentf == null){
return "The cat's name is " + name + ", no mother, no father";
} else if (parentm == null && parentf != null){
return "The cat's name is " + name + ", no mother," + " father is " + parentf.name;
} else if (parentm != null && parentf == null){
return "The cat's name is " + name + ", mother is " + parentm.name + ", no father";
} else if (parentm != null && parentf != null){
return "The cat's name is " + name + ", mother is " + parentm.name + ", father is " + parentf.name;
} else {}
}
}
}