 class Test3-14
      {
         final static int DEPTCODE = 12;                      //
         final int STUCODE= 10021;                         //
         final Student stu = new Student("",10011,11);       //
         public void test()         
         {             
             stu.printMaterial();                //ǰöϢ
             stu.deptCode = DEPTCODE;
             stu.stu_code = STUCODE;
             stu.printMaterial();               //ǰö޸ĺϢ
         }
         public static void main(String[] args)         
         {
            new Main().test();                   
         }
      }//end of class Main
      class Student
      {
         int stu_code;                               
         String stu_name;                            
         int deptCode;                              
         protected Student(String name,int sCode,int dCode)  
         {            
             stu_name = name;                         
             stu_code = sCode;                        
             deptCode = dCode;                       
         } 
         public void printMaterial()
         {
            System.out.println(stu_name +"  "+stu_code +"  "+ deptCode);            
         }       
      }//end of class Student
