.


:




:

































 

 

 

 


. super




, .

, private (, ) , - . . , , Password1 , password (), . public, , . protected . Password2, Password1, , :

public String getPass(){

return password;

};

 

private, password !

, private- , :

 

public class TestPrivate1 {

private String s= private;

 

public String get_s(){

return s;

}

}

 

, , :

public class TestPrivate2 extends TestPrivate1 {

}

 

, TestPrivate2, get_s(), = private:

 

TestPrivate2 tst=new TestPrivate2();

System.out.println(tst.get_s());

 

, s . , , - , , .

protected -. , ( , ), -, . protected , , .

 

: private, , get ( - ) set ( - ). . , .

: , . . x y, , ! setX setY, , . .

: -, x1,y1- ,x2,y2- ,w - , h , s- . : w=x2-x1, h=y2-y1, s=w*h. - . , , x2, w s, . , , !

, , , . , .

NetBeans NetBeans Enterprise Pack. UML- private public- , get set. , , , .

. , - (, , ) . - . , . super. super. ( ). super superclass. , , . super.super. .

super . ( static) super .





:


: 2017-02-28; !; : 803 |


:

:

, .
==> ...

1510 - | 1402 -


© 2015-2024 lektsii.org - -

: 0.008 .