In Java there’s a few different things; Objects, Classes and Variables to name a few.

In this post I’ll be explaining the difference between what an Object and an Object Variable is.

What is an Object?

An object is something that has a state and a behaviour. For example,  sparking water has different states. Temperature, clarity & fizzy-ness for example. The object is an instance of a Class. Likely a Class defining fluids or drinks.

Objects (to make things easier) have real world representations.

What is a Variable?

A variable, in Java, is something we can store things in, manipulate and reference.

For example, a plain piece of paper we might call “Paper 1”. On “Paper 1” we can store a girls phone number. We can also remove it when we realise she’s not into guys.

What’s the difference?

Objects tend to contain variables and methods. Variables are simply storage, but they not always inside of Objects.