public class IdariPersonel extends Personel {
final int sicilNo;
public IdariPersonel(int idno, int sicilNo){}
}
move the sicilNo definition in constructor, int final sicilNo, it accepts that too. What is difference?
public class IdariPersonel extends Personel {
final int sicilNo;
public IdariPersonel(int idno, int sicilNo){}
}
move the sicilNo definition in constructor, int final sicilNo, it accepts that too. What is difference?
when Defining variable in class scope, the other member function could reference the variable, which is, in this case, sicilNo. when Defining variable in constructor, the variable could only be referenced in constructor.