SE450: Basics: Object Diagrams [29/63] Previous pageContentsNext page

An object diagram is a snapshot of a running system, showing live objects.

Here are the ARIs when executing Circle.toString:

+---------------------+   +---------------------------+
|  0 : Main.main ARI  |   |  1 : Circle.toString ARI  |
|  -----------------  |   |  -----------------------  |
+---------------------+   +---------------------------+
|  c:Circle = c0      |   |  this:Circle = c0         |
|  s:String = null    |   +---------------------------+
+---------------------+

Note the difference between the ARIs.

The ARI for toString has a special variable, this, which identifies the object receiving the message.

This is the main difference between a static method and a non-static method.

Previous pageContentsNext page