.


:




:

































 

 

 

 


. .




. , , , .

:

 

( ){

}

 

, , . , , .

 

( )

.

 

,

- (private, protected, public). , .

- (static). , , .

- (final). , , -.

- (native DLL, ; abstract , ). , , .

- (synchronized).

 

, . Java, , , - . , ( ), void. return.

return;

return ;

, .

return , if-else switch-case , . - - return, missing return statement return.

 

, , , , .

1 1, 2 2,, N N

, .

, . , , , . .

. . , ( ), .

( ) , .

. , MyMath mult1 , 1. :

 

double mult1(double x, double y){

x++;

y++;

return x*y;

}

 

:

double a,b,c;

MyMath obj1=new MyMath();// MyMath

c=obj1.mult1(a+0.5,b);

 

, , . , , . , , . , , .

x y , a+0.5 b . , , , . x , a+0.5, y , b. , . . , , . , , . , mult1 double int float. float, int , double .

- y 1, y++, , b? , . y, b. b .

, ? , . Java , , , . Java .

. , , - , . . final. , 1 , . :

double mult1(double x, final double y){

x++;

return x*y;

}

 

:

double mult1(double x, final double y){

x++;

y++;

return x*y;

}





:


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


:

:

,
==> ...

1513 - | 1471 -


© 2015-2024 lektsii.org - -

: 0.01 .