A class can declare both instance and static fields
and instance and static methods.

class
{
  // instance variables
  // static   variables

  // constructors
  // instance methods
  // static methods
}

A method can access a field and a method can call another method.
(Constructors are kind of like methods. They can access fields,
call other constructors, and call methods.)

Here is an important question.
  Which fields can a method access and which other methods can a method call?


The best way to answer this question is to look at a picture of how
objects are put in Java's memory.

             Object       Object     Object     Object
             +----+       +----+     +----+     +----+  instance
             |    |       |    |     |    |     |    |    variables
             |    |       |    |     |    |     |    |    methods
             +----+       +----+     +----+     +----+
               \             |        |            /
                 \           |        |          /
                   \         |        |        /
                     \       |        |      /
                      \/     \/      \/    \/
                           "class object"
                          +------------+
                        /  static        \
                      /      variables     \
                      \      methods       /
                        \                /
                          +------------+

Each of the objects has it own copy of each instance variable and each instance method.

The "class object" holds just one copy of each static variable and each static method.

All the objects of a class have a (hidden) reference to the class's "class object"
which containes the static fields and methods.


Instance methods can access both instance variables and static variables,
and they can call both instance methods and static methods.
(Constructors are a special case of instance methods.)

Static methods can access only static variables
and they can call only static methods.