this post was submitted on 25 Nov 2023
209 points (97.3% liked)
Technology
59446 readers
3750 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
PUBLIC STATIC VOID MAIN STRING ARGS
INT MAIN INT ARGC CHAR POINTER ARGV ARRAY BODY
Say it with me:
PUBLIC STATIC VOID MAIN STRING ARGS
PUBLIC STATIC VOID MAIN STRING ARGS
you know how it goes
As of java 21, you can actually just use:
void main()
You'll definitely get to use Java 21 in whatever job you get.
It feels like some arcane spell when you first learn it, but once you are familiar with Java, each token in that declaration feels totally justified. Like yeah, the args are an array of strings. Yeah, the main function needs to be static and public. Yeah, it doesn't return anything inside the JVM, so it's void.
Java21 is gonna flip your whole world upside down
Yeah my brain still thinks about Java in Java 8 because that was primarily what I worked on when I was a dev.
This had me burst out in laughter real hard omg