class A {
private final int t1;
private final int t2;
public A(int c1, int c2) {
t1 = c1;
initT2(c2);
}
private void initT2 (int c2) {
try {
t2 = c2;
} catch (...) {}
}
}
t1 gets initialized but t2 does not. Cannot assign a value to final variable 's3Client'
is the error.
If I shift the body of the function initT2
inside the constructor, it works. Why doesn't it work outside the constructor when it is being called from inside the constructor?