I have question about if I could call a constructor in another constructor in abstract class. For example,
public abstract class Sth{
protected Sth(){}
protected Sth(int number){}
protected Sth(String word){
int number = 0;
this(number);
}
It seems that Java does not allow me to do this. I wondered if there is any way we could let this happen? Thanks
-----------------------------------------------Explanation---------------------------------------------------------------------- The goal I want to do is to call the second constructor specifically. I got error with must calling the first constructor in Java. So I wondered if we can just skip first constructor without remove any code here. Sorry for the confusion.