The below code can't work, I can't get any idea about reason, why is like that? And if I can find a way to invoke constructor in another override's constructor?
Althrough, I know that there can be a solution, put common init code in a class function. So, forgive me for the siny question.
Public AClass extends BClass {
AClass(Context c) {
super(c);
//below has common init code
//init data and some operations
// other operations
}
AClass(Context c, Attr a) {
super(c, a);
this(c) // error
}
}
also, below can't work either,
AClass(Context c, Attr a) : this(c) {
super(c, a);
}
highly appreciated for your kindly help.