.NET から Java に「変換」しています。以下のコードが機能しないのはなぜですか
class MyClass{
private final int intVar; //ok
private final Paint paint; //error "Variable paint might not have been initialized"
public MyClass(){
intVar = 12;
initializePaint();
}
private void initializePaint(){
paint = new Paint(); //error "cannot assign a variable to final variable"
}
}