codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

What Is An Object, Anyway?

Steven Popovich
codeburst
Published in
7 min readApr 1, 2020

The ambiguous core of Object-Orientated software development.

This is an object…right? Photo by Mike Dorner on Unsplash

I remember taking my first programming course in High School. We learned the ropes of Java, an object-orientated programming language. This means it leverages objects to write programs.

But what exactly is an object? Well, Java’s official documentation says it is a bike (I am going to be referencing this a lot, please read it) and this is what we learned in high school. We learned that an object is “anything with state and can be acted upon”.

In my opinion, this definition is not complete, not clear enough (What is state? What is being acted upon? What does “anything” mean?).

Then my friend came up to me in the halls one day. He was learning Java on his own. And he asked me what an object actually was.

Can you define your own object? What if your bike has gears or doesn’t have gears? What if the bike has training wheels? Does the state change? How do you change the object?

These are great questions and I couldn’t answer them in High School. I remember being perplexed by these questions. Since then I have learned a great deal more about what an object actually is.

Class vs. Object

If you are wondering about objects, you are probably thinking about classes too.

An object is one version of a class. An instance. A class that is created with it’s properites defined with specific values.

For the purposes of this article, that is all there is to it. A class is a blueprint for creating an object. An object has characteristics (properties/fields, whatever you want to call them) set to real values (Int). The class defined what values could be set for that object.

Classes are how objects are built but are a huge topic in themselves. This is outside the scope of this article.

More than a bike.

So now let’s expand our definition of an object. In pretty much all modern languages, an object is more than an instance of the bike class.

There were a lot of wild definitions of objects if you google search, but Wikipedia’s actually is the simplest and captures the breadth of an object:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Steven Popovich

Software Engineer | Full-stack | GameChanger | DICK’s Sporting Goods | Trying my best

No responses yet

Write a response