r/learnprogramming • u/Intelligent_Role_824 • 2d ago
Java or Kotlin for a beginner interested in backend development?
Hello,
I’m a beginner learning programming as a hobby, and I’m mainly interested in backend development.
I’m currently trying to decide between Java and Kotlin. I know both are used for backend development, especially with Spring Boot.
Which one would you recommend for someone starting out? Is Java still the better choice for learning the fundamentals, or would Kotlin be a good starting point too?
I’m not really focused on getting a job right now, just learning and building some fun projects.
Thanks!
2
Upvotes
4
u/Dazzling_Music_2411 2d ago
Kotlin is better as language design, and much more fun; it doesn't suffer as much from the verbose and pedantic Java style - many java devs breathed a sigh of relief when it first came out. OTOH Java will have much more learning material available, as all the world's universities have been on its case since the late 1990s (for better or for worse).
Your call really, what style do you prefer to work with?
2
u/I_Am_Astraeus 11h ago
Kotlin is a better language but Java is better IMO. If you're a beginner it gives you a much more academic view. The friction points are learning points, and you'll appreciate things like null handling more after having to actually deal with nulls yourself.
Just one man's opinion though, there's no right or wrong answer here.
1
u/Both_Bend_2481 2d ago
Java is more popular and you'd probably learn more.
https://www.tiobe.com/tiobe-index/
https://pypl.github.io/PYPL.html
1
u/Otherwise-Leather965 2d ago
Since you're learning for fun, Kotlin is a fine place to start and Spring Boot supports it well. Both run on the JVM and share the same libraries, so if you ever need Java later the switch is mostly just syntax.
1
u/YogurtclosetLow7064 11h ago
I'd personally recommend Kotlin. I prefer it over Java because it has cleaner syntax, less boilerplate, and some really nice modern features. It's also easier to read and write once you get used to it. Java is still great, but I think Kotlin is an excellent starting point, especially for fun backend projects with Spring Boot.
1
u/Technical_Ideal_5439 2d ago
Golang is vastly better, it is easier, designed for new users, lots of cool software in the Kubernetes and Internet space to play with if you want to muck around with opensource projects.
Java is better for getting a job, but I have no idea what that looks like for a new person/junior developer.
1
u/plastikmissile 2d ago
Kotlin is a much cleaner language and very well designed. I wish it was more popular.
0
u/delliott8990 2d ago
Personally, I think Kotlin is a bit easier from a syntax perspective.
0
u/Due-Result7928 2d ago
I’m not really focused on getting a job right now...learn AI...Kotlin...?...niche market. Is Java better for getting a job....as a junior you can not expect to be a developer for the backend. Learn typescript or javascript, html, css.
Agree wit u/Technical_Ideal_5439 go is nice and widely use.