1. Parameters, Local Variables, and Overloading

The state of an object consists of the data it holds in its instance variables. Instance variables hold their values until they are explicitly changed or until the object is destroyed.

An object's methods frequently work with other values that are not held in instance variables. These values are held in local variables and parameters. This chapter discusses how these are declared and used.


Chapter Topics:

  • Formal and Actual Parameters
  • Scope of Parameters
  • Local Variables
  • Scope of Local Variables
  • Method Overloading
  • Signature of a Method


Question 1:

(Review:) What is a parameter of a method?


Source: Bradley Kjell, http://programmedlessons.org/Java9/chap51/ch51_01.html
Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 License.