DEV Community

Cover image for Java, OOP, and the Steady Path Forward
Rodrigo De Lascio
Rodrigo De Lascio

Posted on • Originally published at rodrigodelascio.co.uk

1 1

Java, OOP, and the Steady Path Forward

Hey Devs đź‘‹

This week, I stepped deeper into Java and OOP — not just as part of my university module, but also as a way to stay grounded while dealing with personal grief.

I’ve been reviewing topics like:

  • What is OOP?
  • Classes, objects, and visibility in Java
  • Constructors, getters, setters
  • The beginnings of encapsulation

And to bring it all together, I built a simple Java project modelling a bank account. Private balance, public methods, account types, deposits, withdrawals, and realistic conditionals (sadly no “print transaction confetti” yet).

Progress is slow, but it’s progress. Sometimes code gives you structure when life doesn’t.

Java, OOP, and the Steady Path Forward

It’s been a heavy couple of weeks. I won’t pretend otherwise. But in the quiet moments between the waves of grief, I’ve found some comfort in structure, and there’s no better structure right now than Java’s object-oriented programming model.

I’ve just started my Object-Oriented Programming (OOP) module at university, all Java-based, and alongside it, I’m taking an extra course to make sure I really absorb the concepts, not just pass the module. Slow and steady. Not moving on, but moving forward.

And while many of the topics feel familiar (I’ve seen them before in my earlier dev journey), Java’s strictness, clarity, and obsession with visibility have given me a sharper lens on how it all fits together.

What I’ve Been Studying

Here's a quick list of what I’ve covered so far:

  • What is OOP? A programming paradigm that thinks in terms of objects, not just functions and data.
  • What is an Object? Not just “a thing”, but a bundle of state and behaviour. Like a dog, or a bank account. (One hurts a bit more to talk about right now.)
  • Classes and Objects in Java Classes are blueprints. Objects are the real-world instances. I’ve seen this concept before, but Java really leans into it with its strong typing and access control.
  • Visibility of Objects and Members Java makes you choose: public, private, protected. Every attribute and method must wear a name tag that says who can interact with it.
  • Special Methods Constructors, getters, setters. The behind-the-scenes machinery that keeps your objects sane and your access clean.

My Practice Project: The Bank Account Class

To bring it all together, I built a basic BankAccount class, the kind of exercise that’s simple enough in theory, but full of edge cases once you really start thinking like a developer.

Each account holds state (like balance, owner, account type) and methods to act on it, deposit, withdraw, open/close, pay fees.

It’s satisfying to see how encapsulation comes into play. Want to mess with the balance directly? Too bad, it’s private. Use the method like a respectful developer, please.

The logic starts to look real: conditionals for insufficient funds, fees based on account type, message outputs that sound a little too realistic for some of the bank branches I’ve dealt with.

I even added a currentStatus() method to print out everything about the account, because debugging is easier when your objects talk back.

What’s Next

Next stop: Encapsulation, in full. I’ve already dipped into it, but the next lessons will take a deeper dive into how Java uses access modifiers to protect data, enforce behaviour, and encourage cleaner code.

And honestly, I’m looking forward to it.

Right now, having something to structure my time, focus my energy, and remind me of progress, no matter how small, is incredibly grounding.

Final Thoughts

It’s a strange comfort to return to code when life feels uncertain. OOP is, in a way, about containment, wrapping up state and logic so things behave predictably. And that predictability is a relief right now.

I’m learning, I’m building, and I’m still here... one class, one object, one method at a time.

Let me know how OOP made sense to you — or what helped it finally click 👇

Google AI Education track image

Build Apps with Google AI Studio đź§±

This track will guide you through Google AI Studio's new "Build apps with Gemini" feature, where you can turn a simple text prompt into a fully functional, deployed web application in minutes.

Read more →

Top comments (2)

Collapse
 
m__mdy__m profile image
Genix •

I can't say for sure, but OOP is one of the most structured and thematic paradigms, and Java demonstrates it well.

Collapse
 
michael_liang_0208 profile image
Michael Liang •

Nice post

Great read:

Is it Time to go Back to the Monolith?

History repeats itself. Everything old is new again and I’ve been around long enough to see ideas discarded, rediscovered and return triumphantly to overtake the fad. In recent years SQL has made a tremendous comeback from the dead. We love relational databases all over again. I think the Monolith will have its space odyssey moment again. Microservices and serverless are trends pushed by the cloud vendors, designed to sell us more cloud computing resources.

Microservices make very little sense financially for most use cases. Yes, they can ramp down. But when they scale up, they pay the costs in dividends. The increased observability costs alone line the pockets of the “big cloud” vendors.

đź‘‹ Kindness is contagious

Take a moment to explore this thoughtful article, beloved by the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A heartfelt "thank you" can brighten someone's day—leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay