Lädt...

🔧 Still Java. Still Standing. Still Learning.


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Hey Devs!

My Object-Oriented Programming module just launched at uni — and while I’ve seen a fair bit of OOP before, this time I’m diving in properly with Java. Think of it like a revision session… but the kind where the teacher actually checks your work.

This post covers:

  • Java's primitive types and strict typing
  • Input/output with Scanner
  • Type conversion, operators, and the underrated ternary
  • Comparing objects the right way (hello .equals())
  • Some good old conditional structures

No “I’m a total newbie” energy here, just honest reflections from a career-changer who’s been in the code trenches for a while, and still finds joy in learning the fundamentals (again, but better).

Java Primitives: It’s a Family Affair

In Java, primitive types come in families. It’s not just one lonely int out there in the wild, no, there are whole lineages of data types, each with its quirks, limits, and memory footprints. And Java, being the serious language that it is, wants you to declare things properly.
You’ve got options:
Declare it plainly.
Typecast it.
Wrap it up in an object with a wrapper class.

Basically, Java wants commitment. None of that “figure it out later” dynamic typing nonsense.

Input, Output & That Trusty Scanner

So far, I’ve experimented with different ways to display information - clean, formatted, and sometimes just shouting values out into the void. Output’s great, but what really makes it feel like a program is when you can interact with it.
That’s where java.util.Scanner comes in. Suddenly, Java’s listening. Keyboard input? Monitored. Captured. Handled with the type safety of a neurotic bodyguard.
And yes, I built a GUI version of a sum calculator with Swing. Because who doesn’t want to add two numbers with flair, right?

Operators, Math & More

Refreshed my memory on:
Arithmetic operators (+, -, %, the usual suspects)
Unary operators (Java's way of raising a single eyebrow)
Assignment operators (+=, -=, etc)

Then there’s the Math class, Java’s in-built toolkit for square roots, exponents, and generating random numbers (between 0.0 and 1.0).
With a bit of clever math, you can scale those to any range you like, which makes it perfect for anything from dice rolls to secret superhero name generators.

Logic, Relational Thinking & Ternary Muscles

This part took me back to my first steps in this field, the first course I have joined… the logic gates of programming:
&&, ||, !, the Boolean heavyweights.
Comparison operators like >, <, ==, etc.

And then there’s the ternary operator, which always makes me feel like I’ve written clever code even when I’m just comparing two numbers.
larger = n1 > n2 ? n1 : n2;
Clean. Elegant. Looks like I know things.
Also, a quick reminder from Java: comparing objects with == is like asking if two people are the same because they wear the same coat. What you meant to ask was if they have the same name, and for that, you use .equals().

If, Else If, Else Else Else Else Else…

My most recent lessons have been all about conditionals. Nothing groundbreaking here, I’ve seen them before, but Java still finds a way to say, “I know you know this... but do you really?”
You’ve got your if, your else if, your else, and those rare but magical moments when you finally don’t need curly braces. But spoiler: I still use them, because I like sleeping at night.

Final Thoughts

Right now, Java feels like the strict but fair teacher I wish I had in high school, the one that didn’t let you get away with shortcuts but always made sure you understood why things worked the way they did.
A lot of what I’m covering feels familiar, like meeting a concept I knew from another language, but this time it’s speaking Queen’s English and wearing a tie.
There’s still a lot to cover, or review(?). Classes, methods, objects, all the OOP hits are coming, and I’m ready. Well, mostly ready. I’m showing up, taking notes, and occasionally laughing at my own code when it behaves like a teenager with selective hearing.

Where are you in your Java (or OOP) journey? Have you revisited a topic recently that hit different the second time around? Let’s talk.

...

🔧 Still Java. Still Standing. Still Learning.


📈 42.42 Punkte
🔧 Programmierung

📰 Standing, Not-Standing with the Protesters: U.S. Policy on Hong Kong and BLM


📈 34.74 Punkte
📰 IT Security Nachrichten

🐧 Nice Linux use case - how 2400 sensors and machine learning models keep Sydney Harbour Bridge standing


📈 22.92 Punkte
🐧 Linux Tipps

📰 Apple is Still Standing in the Way of Epic's App Store


📈 21.99 Punkte
📰 IT Security Nachrichten

📰 The 22 best New Year's deals still live: Smartwatches, headphones, standing desks, and more


📈 21.99 Punkte
📰 IT Nachrichten

🍏 Apple isn't standing still on generative AI, and making human models dance is proof


📈 21.99 Punkte
🍏 iOS / Mac OS

📰 Fear the Walking Dead Staffel 5, Episode 7: Das passiert in &amp;quot;Still Standing&amp;quot;


📈 21.99 Punkte
📰 IT Nachrichten

📰 Razer Chroma: Aether Standing Light Bars mit Matter lassen sich drehen


📈 17.37 Punkte
📰 IT Nachrichten

📰 Why this is my must-have standing desk accessory


📈 17.37 Punkte
📰 IT Nachrichten

📰 Mi Smart Standing Fan Pro: Kabelloser Standventilator bei eBay 50 Euro günstiger


📈 17.37 Punkte
📰 IT Nachrichten

📰 Facebook wants to reveal your name to the weirdo standing next to you


📈 17.37 Punkte
📰 IT Security Nachrichten

🔧 CSS and js standing fan


📈 17.37 Punkte
🔧 Programmierung

📰 Standing desk deal: Save $90 on FlexiSpot Theodore


📈 17.37 Punkte
📰 IT Nachrichten

🎥 Pulling the PKPLUG: the adversary playbook for the long-standing espionage activity of...


📈 17.37 Punkte
🎥 IT Security Video

📰 KDevelop 4.7.4 Open-Source IDE Improves GCC 6 Support, Fixes Long-Standing Bugs


📈 17.37 Punkte
📰 IT Security

🔧 The Only Thing Standing Between You and Web Development Is Taking the First Step


📈 17.37 Punkte
🔧 Programmierung

🍏 FlexiSpot Odin E7Q review: A heavy-duty standing desk


📈 17.37 Punkte
🍏 iOS / Mac OS

📰 NatWest Bank alerts customers of standing order blunder


📈 17.37 Punkte
📰 IT Security Nachrichten

📰 Standing behind “MSRC Listens”


📈 17.37 Punkte
📰 IT Security Nachrichten

📰 59% of public sector apps carry long-standing security flaws


📈 17.37 Punkte
📰 IT Security Nachrichten

🪟 Secretlab Magnus Pro desk review: The standing king of cable management


📈 17.37 Punkte
🪟 Windows Tipps

📰 NASA's Viral 'Standing Broom' Trick Has Nothing To Do With Earth's Gravitational Pull


📈 17.37 Punkte
📰 IT Security Nachrichten

📰 Over 10,000 Facebook Users Worldwide Falsely Check in at Standing Rock To Confuse Police


📈 17.37 Punkte
📰 IT Security

🔧 Apple’s new Home products will challenge a long-standing Apple rule, here’s why - 9to5Mac


📈 17.37 Punkte
🔧 Programmierung

🍏 FlexiSpot E7 Pro Plus Standing Desk review: Simple design with smooth height transitions


📈 17.37 Punkte
🍏 iOS / Mac OS

📰 FlexiSpot Bamboo EN1 review: Affordable electric standing desk with stand interval reminders


📈 17.37 Punkte
📰 IT Nachrichten

🔧 Should you use a standing desk?


📈 17.37 Punkte
🔧 Programmierung

🪟 Halo Infinite is already removing its new Last Spartan Standing game mode


📈 17.37 Punkte
🪟 Windows Tipps

📰 Man Standing ist eine absurde Parodie von Death Stranding auf PC


📈 17.37 Punkte
📰 IT Nachrichten

📰 Social Media Made the World Care About Standing Rock—And Helped It Forget


📈 17.37 Punkte
📰 IT Nachrichten

📰 Zero-Standing-Privileges – Was ist Mythos und was ist Realität?


📈 17.37 Punkte
📰 IT Security Nachrichten

📰 Standing behind “MSRC Listens”


📈 17.37 Punkte
📰 IT Security Nachrichten

🪟 This Autonomous Standing Desk is a Great WFH Option


📈 17.37 Punkte
🪟 Windows Tipps

📰 Samsung Protective Standing Cover im Test: Outdoor-Hülle für das S9


📈 17.37 Punkte
📰 IT Nachrichten