0
  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?

CursedChico
  • 571
  • 4
  • 7
  • 17
  • 1
    Sorry, but I'm very confused. Can you try using ctrl+k to format your code? I'm having trouble distinguishing code from your question. – PunDefeated Jul 17 '13 at 06:58

1 Answers1

1

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.

lulyon
  • 6,707
  • 7
  • 32
  • 49