Lecture 5: Anatomy of a simple Java application.
Here's the diagram for the last example discussed in class today.
Remember that a class defines a template that contains:
Please note that this
addresses only isssues that relate to class and instance variables. The
variables that are local to class or instance methods (for example
b local to
main of class
A) cannot be accessed from outside the class (
in our example). They serve as local working space (scratch paper) for
those methods and the best you can do is to pass them (if you need to) as
parameters to other methods.