The use of static variables can often cause problems and is not recommended in most cases.

For one class to access the contents of an instance of another class, it needs a reference to that...