Miscellany
public text v1 · immutable private static Person[] getForefathersRecursiveHelper(int n, Person p){
Person[] arr = new Person[n];
boolean isTrue = false;
int arrayCounter = n;
while(isTrue == false) {
if (p.getFather() == null) {
isTrue = true;
}else{
// More fathers to be found, increase counter
p = p.getFather();
arrayCounter ++;
}
}
System.out.println("Array Counter: " + arrayCounter);
return arr;
}