go to previous page   go to home page  

Answer:

Sure. It is follows correct syntax. Notice that it is doing integer division, though. Possibly a better statement would be:

double avg =   (double)ArrayOps.sumElements( ar1 ) / ar1.length ;   

End of the Chapter

You have reached the end of the chapter. Click on one of the following if you wish to review some method.

The next chapter discusses how methods can change the values in an array.


go to previous page   go to home page