1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
class Z { static int x = 0; private int y; void T( ) { // autoris� ici y = x ; this.y = this.x ; x = y ; this.x = this.y ; } } extern public void test() { Z a(); 3 * a.x; // autoris� //vu 3 * a.y; // interdit //vu a.y = 3; // interdit ici a.x = 1; // autoris� show ( a ); a.T(); show ( a ); }