6. Methods: A Deeper Look


In this chapter you’ll learn:

• How static methods and fields are associated with an entire class rather than specific instances of the class.

• To use common Math methods available in the Java API.

• To understand the mechanisms for passing information between methods.

• How the method call/return mechanism is supported by the method-call stack and activation records.

• How packages group related classes.

• How to use random-number generation to implement game-playing applications.

• How the visibility of declarations is limited to specific regions of programs.

• What method overloading is and how to create overloaded methods.

• To write and use recursive functions, i.e., functions that call themselves. ...

Get Java™ for Programmers: Deitel now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.