The object diagram is the less-talked-about sibling of the class diagram — but for debugging, doc, and live demos it earns its keep. It’s the class diagram’s “snapshot right now.”
One-line definition
An object diagram shows the instances (objects) in the system at a particular moment in time and the links between them. A class diagram says “what types exist”; an object diagram says “what instances exist right now and how they’re linked.”
object "Order A" as oA { id = "ORD-2026-001" status = "PAID" paidAt = "2026-07-29 14:00" customerId = 1024 }
object "Order B" as oB { id = "ORD-2026-002" status = "PROCESSING" customerId = 1024 }
object "User A" as uA { id = 1024 email = "alice@example.com" vip = true }
object "Refund request X" as rX { id = "REF-001" orderId = "ORD-2026-001" status = "PENDING_APPROVAL" amount = 299.0 }
oA --> uA : belongs_to oB --> uA : belongs_to rX --> oA : references
note right of rX Key points: - Refund X references Order A - Order A status is PAID (not REFUNDED) - Until REFUNDED is set, rX stays PENDING_APPROVAL - This is a legitimate intermediate state end note
@enduml
Such an image in an issue comment is worth a thousand words — and easier than reading a hundred-line System.out.println.
Object vs class
Dimension
Class diagram
Object diagram
Depicts
Relationships between types
Current instances + their links
Keyword
class
object
Fields
Type signatures
Actual values
Relations
Static dependencies
Runtime references
Use
Design / doc
Debug / demo
Quantity
One per type
One per moment (each may differ)
Use them together: class diagram first for “structure”, object diagram second for “what that looks like right now.”