I get the recursive construct overflow invocation error at the four public tuna parts (parts=maybe a class or something else?). It worked on the tutorial but not for me and can't seem to see where
public class tuna {
private int hour;
private int minute;
private int second;
public tuna() {
this(0,0,0); //default
}
public tuna(int h){
this(h,0,0); //with hours input
}
public tuna(int h, int m){
this(h,m,0); //with hours and minutes
}
public tuna(int h, int m, int s){
this(h,m,s); //with hours, minutes and seconds
}
You're doing a recursive call here:
You should set your private members in this constructor. It should be something like:
Insead of this(h,m,s); use setTime(h,m,s);
It should be: