PPT Slide
Single construct for both procedures and functions:
when a function is called for, specify the
appropriate return type before method name
Java Methods
public float average (float fNum1,
float fNum2, float fNum3)
{
float fReturnVal;
fReturnVal =
(fNum1 + fNum2 + fNum3)/ 3;
return (fReturnVal);
} // of average
Previous slide
Next slide
Back to first slide
View graphic version