<- back

Why (not) start with Java?



TL;DR

  • Java's verbose syntax and boilerplate code make simple tasks unnecessarily complex.
  • Strict syntax rules (semicolons, curly braces, capitalization) create a steep learning curve.
  • While Java might teach good programming habits, it can be overwhelming for beginners.


I don't know yet why does Java make everything so complicated. I'm trying to learn programming, but Java feels like it's going out of its way to make even the simplest tasks harder than they need to be. Take "Hello, World!" for example. In Java, it's not just a single line of code. No, you need a whole ceremony:


public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Why do I need a class? Why do I need public static void main(String[] args)? I'm just trying to print a sentence! It feels like Java is asking me to build a house just to open a door.


And then there's the syntax. Everything in Java is strict. Forget a semicolon? Error. Miss a curly brace? Error. Use the wrong capitalization? Error. It's like the language is waiting for me to mess up so it can throw a wall of red squiggly lines in my face. How am I supposed to experiment and learn when every tiny mistake feels like a disaster?


Even something as simple as declaring a variable feels unnecessarily verbose. Want to store a number? Here's what Java makes you do:


int number = 42;  // Have to specify it's an integer
double price = 19.99;  // Have to specify it's a decimal
String text = "Hello";  // Have to specify it's text

Okay, fine, but why do I have to specify the type every time? Can't the language figure it out? And don't even get me started on creating objects. If I want to create a simple object, I need to write a whole class first:


public class Person {
    private String name;
    
    public Person(String name) {
        this.name = name;
    }
    
    public String getName() {
        return name;
    }
}

All of that just to store a name? It feels like overkill. And then, when I actually want to use it:


Person person = new Person("John");
System.out.println(person.getName());

Why does everything take so many steps? The language seems to love making me jump through hoops for even the simplest tasks.


I get that Java is supposed to teach me "good habits" and "strong fundamentals" but right now, it just feels like it's slowing me down. I'm spending more time fighting with the syntax than actually learning how to solve problems. Other languages, like Python, seem so much simpler. In Python, I could do the same thing in just a few lines:


# Hello World
print("Hello, World!")

# Variables
number = 42
price = 19.99
text = "Hello"

# Simple object
class Person:
    def __init__(self, name):
        self.name = name

person = Person("John")
print(person.name)

That's it. No classes, no methods, no boilerplate. Just the result I want, without all the extra noise.


Java might be powerful, but as a beginner, it feels like I'm carrying a toolbox full of heavy tools when all I need is a simple hammer. Maybe one day I'll appreciate all the structure and rules, but right now, it just feels like too much. For now, I'm sticking with it because that's what I'm learning, but I can't help but think there has to be a better way to start programming.


Hope to see some sense in this soon, when I will supposed to be better.



<- Back to blog


All rights not reserved. Do you want a website like this? Just copy it 👍🏾