← Back to all posts

01 Java Fundamentals

Introduction to Java

By Dummy for Dummies


Introduction

I'll explain everything the way I learned it, step by step, assuming we're all figuring this out together.

Forget the syllabus language, "Computer Programming Concepts & Paradigms," all of that. We won't be talking like that here.

Act like we all share a single brain cell. Follow along, and I'll only explain what's actually important.


What Is Java?

The world of computers is a magical one. Programming languages are like spells, some dark, some simple, some hard yet powerful.

Java is one of those spells. You tell the computer what to do, and it does it, whether that's creating a game character, making it walk, or reading a file.

Think of it this way: you speak to the computer in Java, and the computer listens. Every single time.


Why Choose Java?

Monkey loves banana, monkey gets banana, monkey happy. You love money, you get money, you happy.

Over 3 billion devices run on Java. Write your code once, and it runs on Windows, macOS, Linux, and Android without changing a thing. That's enough praise for now.

To make money as a CS student, Java is one of the best entry points, though not the only one. Here's how it compares to two other common starting languages:

Python

Someone asks how to drive, you say "this is the accelerator, press it, boom, it's driving."

Great for machine learning, easy to start, but sometimes too easy. You miss important concepts early on.

C++

Someone asks for a driving lesson, you start lecturing about how the engine works and how to build your own.

Brilliant once you know it, you'll understand any vehicle after. Just too much for a beginner.

Java

"This is a car. These are the pedals. It drinks petrol. This is how you drift. This is why it needs water too."

You end up knowing 80% of how engines work. Every language after this repeats most of the same ideas.


How to Run Java?

To run Java, you need the Java Development Kit (JDK). Think of the JDK as Dumbledore of Java magic. You write code, Dumbledore translates it into something the machine understands, then runs it on your PC.

There's also something called the JVM, but that's a later conversation. Right now, only what we're actually doing matters.

After installing the JDK, you need to set its PATH. Dumbledore needs his dictionary to translate and his manual to run your code, and PATH is where you tell your PC to remember those tools live. Without that location saved, Dumbledore shows up with nothing.

Those two tools are:

Where to write code? You can technically write Java in a .txt file, but use VS Code. It's free, and you'll grow into its features over time.


Closing

That's it for the introduction. Next up, we write our very first program: Hello World.

Next → 02 - Your First Java Program - Hello World