←back to thread

873 points belter | 4 comments | | HN request time: 0.495s | source
1. qwertox ◴[] No.42949893[source]
> Java is a great language because it's boring

My issue with Java is not that it's boring, which it is not, but there is so much that needs to be done to get a simple "Hello World" program to run which also depends on an external library. It feels like you first have to build a castle just to put a bed in a room.

replies(2): >>42950515 #>>42951219 #
2. geophile ◴[] No.42950515[source]
Do you mean "public class HelloWorld { public static void main(String[] args) { ... } }"?

Or the ridiculous Spring abstractions that many people insist on?

The former is a minor nuisance, easily filled in by an IDE. The latter is far worse, unnecessary bloat and complexity. Architecture Astronaut stuff.

3. MichaelNolan ◴[] No.42951219[source]
These days hello world in Java is just:

```void main() {print("hello world"}``` And you can skip the compile step as well and run it with just `java yourFile.Java`

Since JEP 495 they have made "simple programs" very simple.

replies(1): >>42952555 #
4. qwertox ◴[] No.42952555[source]
yes. main() is the room and print("hello world") the bed.

with the castle I'm referring to the whole myriad of things that must be done to be able to compile this. But, as I said, at least drop in a library, possibly via Gradle.