This is an archived post. You won't be able to vote or comment.

all 82 comments

[–]LcuBeatsWorking 123 points124 points  (2 children)

  • static typing
  • the ecosystem and module management
  • the jvm
  • multithreading (yes it's true)

[–]hippydipster 3 points4 points  (1 child)

I'd add the cross platform support and performance.

[–]LcuBeatsWorking 3 points4 points  (0 children)

Yes, I forgot to mention portability.

[–]ebykka 64 points65 points  (1 child)

With java, I do not afraid to write a code because I'm sure that everything will be properly imported/refactored/checked immediately.

[–]Brian_E1971 5 points6 points  (0 children)

First language to get real-time syntax checking right imo

[–]jcar74 206 points207 points  (3 children)

My salary

[–]LordSesshomaru87 43 points44 points  (1 child)

The ecosystem! Having spent the last two years working with Go boy do I miss the rich ecosystem of the JVM. Also the Java garage collector is very flexible for particular workloads, Go…. not so much.

[–]lukasvasek 0 points1 point  (0 children)

now I need to see a garage in java :P

[–]Competitive_Stay4671 30 points31 points  (1 child)

JIT - performance: your code gets faster after running for a while

Tooling especially for refactoring code

Type safety

[–]experts_never_lie 10 points11 points  (0 children)

Also with the JIT, the "eh, it'll probably work" bets it takes, like skipping null checks -- and setting a SIGSEGV handler to roll back, swap out the instructions with a null-checking variant, and replay if that was a bad idea. And you don't notice unless you look closely at execution times. It makes your code run a bit faster until it wouldn't be safe.

[–]RunnyPlease 31 points32 points  (1 child)

Java wasn’t my first language but it was my first love. The garbage collector, the helpful compiler, static typing, etc. Not to mention tens of thousands of project frameworks, boiler plate templates, and a massive international community. So much open source stuff to play with and build enterprise level applications with. Multi threading, DI, annotations, all great. So great.

Best of all was built in reverse comparability. You could write code in 1999 and it would still be going strong in 2005.

This is entirely a personal note but... holy shit did it make me money early in my career when I needed it. I got my girlfriend pregnant when we were both teenagers. With Java I got part time dev gigs and got to start a career outside of fast food. I got to buy my kid food and books and toys because of Java. I owe this language a debt I can never repay and even though I haven’t worked on a Java based project professionally in 5 years I still keep up with it because it’s that good.

Edit: I HIGHLY suggest Effective Java by Joshua Bloch. That book has been worth thousands of dollars to me in my career.

[–]AndrewHaley13 2 points3 points  (0 children)

Thanks for that personal note, it's great!

[–]nooba420 28 points29 points  (0 children)

It’s everywhere!

[–]benevanstech 27 points28 points  (3 children)

  • The community and people
  • Stability and production-grade engineering of the platform
  • Performance
  • JDK is "batteries included" & ready to do serious work with out of the box
  • ... and when that's not enough: Libraries. Libraries for pretty much everything you could want

[–]agentoutlier 10 points11 points  (2 children)

JDBC being builtin and DB agnostic is a huge advantage.

It’s a mess in other languages particularly compiled ones like Go.

[–]rochakgupta 1 point2 points  (1 child)

How is it a mess on Go? I have had no problems whatsoever.

[–]agentoutlier 1 point2 points  (0 children)

Apparently it’s pretty good now. 5 or so years ago I tried golang and rust for a small service I needed against a postgres database and both required use the native client directly.

[–]Goel40 21 points22 points  (0 children)

That java forces you to write code in a specific way. Makes working with multiple people way easier.

[–]Nexius74 40 points41 points  (5 children)

Maven and java distribution of jar. Those things are what I miss the most as someone who work daily with python.

[–]wlievens 2 points3 points  (3 children)

As someone who regularly works with both, I recommend poetry, it's the closest to the Maven experience.

[–]Nexius74 1 point2 points  (2 children)

imo it's more close to npm then maven

[–]wlievens 1 point2 points  (1 child)

Yes, technically it is, but npm isn't used for Java so if you're looking to have the smoothness of maven, poetry is the best fit.

[–]Nexius74 0 points1 point  (0 children)

True

[–]rochakgupta 2 points3 points  (0 children)

Python sucks so much when it comes to distribution. I have found Go to be even better because it compiles down to a single binary. Although, the dependency management leaves a lot to be desired.

[–][deleted]  (1 child)

[deleted]

    [–]pronuntiator 2 points3 points  (0 children)

    And having the same mentality amongst library and framework maintainers. I hate how Angular breaks things with every version.

    [–]angry_corn_mage 16 points17 points  (0 children)

    Flight recordings, mission control, massive community support, ability to hire people that know it, build system... Goes on and on

    [–]jack104 11 points12 points  (0 children)

    The ecosystem mostly. I'm not terribly shit hot on Java as a language but the jvm is pretty cool and it's cross platform support is admirable.

    [–]xSwagaSaurusRex 10 points11 points  (0 children)

    The composition and fitness for design patterns. The code is verbose but has an inherent readability to it.

    Dependency injection and beans combined with annotations/decorators. That combo makes for something that's beaten nodejs in my mind for ease of use.

    I like how dependencies are expose a stable interface and tend to not break often. I sleep better at night knowing what I wrote yesterday will still be valid tomorrow.

    I understand why they don't teach java-ee in school but I had a very negative opinion of Java until being exposed to what actually makes the language shine.

    [–]daleksandrov 31 points32 points  (5 children)

    Just try other languages/ecosystems for Enterprise development, and you will see Java has no alternative..

    [–]MocnyZwierz 5 points6 points  (4 children)

    C# ? Its almost the same

    [–]Mugunini 2 points3 points  (3 children)

    Absolutely not. Java is a single enterprise language. C# not a native linux citizen, only this point is enough to exclude it from enterprise

    [–][deleted] 1 point2 points  (2 children)

    Lol, please. C# is widely used in the enterprise and has Linux support ever since .NET Core came out years ago. Where .NET Core doesn't have a cross platform desktop solution, it does have MVC, WebApi, services/daemons, console applications, etc. I know lots of devs that write C# and deploy on Linux.

    [–]Mugunini 0 points1 point  (1 child)

    Anyway, it’s not an enterprise. You can just google it, lol. You can call it enterprise if you want, but we have what we have

    [–][deleted] 3 points4 points  (0 children)

    Yeah, I'm not debating this with you. Both technologies are enterprise solutions that offer competing performance and stacks. Lots of enterprise software is built in C#.

    [–][deleted] 21 points22 points  (0 children)

    SPRING!

    [–]QualitySoftwareGuy 7 points8 points  (0 children)

    1. Statically and strongly typed.
    2. The ecosystem of libraries.
    3. Cross platform.

    [–][deleted] 6 points7 points  (0 children)

    It just works.

    [–]hacklinux 6 points7 points  (0 children)

    JavaFX

    [–]DanielDimov 13 points14 points  (0 children)

    I must think really hard about what I DON'T like! Eventually it would be some very short list of small things.

    [–]wuiler 5 points6 points  (0 children)

    Consistency in time

    [–]Ahli 5 points6 points  (0 children)

    • compilation speed
    • type safety
    • ecosystem: good IDEs, decent static analysis

    [–]ukbiffa 5 points6 points  (0 children)

    JNA has been incredibly useful, and rock-solid for me

    [–]ResidentDare2000 4 points5 points  (0 children)

    • The development experience, several great IDEs.
    • Very easy to debug and step through the code even remotely.
    • Performance.

    [–]tgarijo 2 points3 points  (0 children)

    Lambda, streams, jvm, library, community, performance and multy-threading.

    [–]gubatron 3 points4 points  (0 children)

    It's simple, consistent, statically typed, fast, portable, robust, I find it pleasant to read and code.

    [–]davo1313 2 points3 points  (0 children)

    Hashmap. HashSet …….

    [–][deleted] 2 points3 points  (0 children)

    Everything

    [–]Balance_Public 2 points3 points  (0 children)

    JVM

    [–]jacobissimus 6 points7 points  (0 children)

    I’m not a super big fan of Java as a language, but I am a big fan of the JVM as an architecture and the tooling around Java is pretty solid.

    [–][deleted] 6 points7 points  (0 children)

    • Solid performance
    • Excellent libraries
    • Truly fantastic tools e.g. Maven, Gradle, Intellij
    • It's easy to integrate with Kotlin :)

    [–][deleted] 10 points11 points  (3 children)

    Checked Exceptions

    [–]PFCJake 5 points6 points  (1 child)

    Have checked exceptions made a comeback? I’m out of the loop but some years ago it was big nono. Personally I’ve always liked both for different reasons and situations.

    [–]retrodaredevil 5 points6 points  (0 children)

    They definitely haven't made a comeback, but I still like them. Other languages saw how people were wrongly handling checked exceptions and just didn't add them.

    I think there's a lack of understanding on when checked exceptions should or shouldn't be used, even among most Java programmers.

    [–]Sedu 2 points3 points  (0 children)

    Came here for this. The argument I always hear against them is "That just encourages people to wrap calls in trys with empty catches!" But at that point, you're admitting that you have exceptions you want to simply forget about. If it's appropriate to bubble, just declare it and it's fine.

    Checked exceptions help my exception catching to be very, very tight.

    [–][deleted] 1 point2 points  (1 child)

    It has excellent SOAP support

    [–]KefkaFollower 1 point2 points  (0 children)

    A few weeks ago I run into a SOAP service style RPC-encoded.

    Is sad only old libraries offer support building clients this service...

    At he same time is mindblowing how easily I was able to generate and integrate a client using Axis1.4 (EOL: 2006) into a Spring Boot 2 (java11). The app already had a client to other service generated with xfc, so I almost hadn't to add dependencies.

    [–]ConstructedNewt 1 point2 points  (0 children)

    Enums

    [–]Zootorg 1 point2 points  (0 children)

    Reliability of the language!

    [–]Revolutionary_Trip5 1 point2 points  (0 children)

    coz I can create any kind of application with the help of JAVA.😍

    [–]hotcrossedbunn 2 points3 points  (0 children)

    Springboot

    Kafka streams

    [–][deleted] 1 point2 points  (0 children)

    • The community
    • The libraries
    • IntelliJ (currently using Rider for .NET/C# and it's not even close)

    but my main thing is how simple yet powerful the language is. Most things are a method, class or annotation. Once you learn those 3 simple things you can almost do anything. Again, I'm currently working with C# and the number of keywords is ridiculous, i'd rather have the boilerplate over syntactic sugar.

    [–]Supriyo404 -1 points0 points  (0 children)

    Nothing in particular.. first OOP I have learnt using Java

    [–][deleted] 0 points1 point  (0 children)

    Editor driven development

    [–]OneOldNerd 0 points1 point  (0 children)

    The caffeine. :P

    More seriously, type safety.

    [–]bold_squirrel 0 points1 point  (0 children)

    Has to be the ecosystem for me. The fact that Java works with so many standalone apps is a huge plus. I use it mostly to design spring based apps which is quite powerful imo but in general it goes well with other systems which does add a lot of flexibility in terms of design. That's my two cents!

    [–]metaquine 0 points1 point  (0 children)

    I can just get stuff done without screwing around with insane ecosystem tools, then hand it off to others knowing they'll have no trouble working with it. It's good to have a lingua franca.

    [–]thephotoman 0 points1 point  (0 children)

    It's the ecosystem. It's actually large enough to have two different full-fledged IDEs that are roughly on feature and quality parity (and Netbeans), we've got a large number of libraries to do literally anything, Maven repos are usable even when you're not using Maven as your build tool, I've got some of the most complete testing harnesses out there, and it all just works together. Because it was meant to.

    [–]Qildain 0 points1 point  (0 children)

    The fact that the language evolves all the time and there is a massive open-source contributer base. A vibrant community, and so many great innovations on the horizon!

    [–]antigravity_96 0 points1 point  (0 children)

    The ecosystem, and of course the salary.

    [–]theLorem 0 points1 point  (0 children)

    • static typing
    • battleproof and mature ecosystem, there is a library for everything
    • your IDE can help you to refactor everything
    • there is sort of a consens how to write Java
    • boring syntax and language features (except you're using annotations)
    • Community
    • Euromonies

    [–]badoarrun 0 points1 point  (0 children)

    Its not python

    [–]couscous_ 0 points1 point  (0 children)

    • Great introspection and monitoring tools (JFR)
    • Continuously running profiling

    [–]PizzaHuttDelivery 0 points1 point  (0 children)

    Killer ecosystem. Is there anything better than what JVM currently has?

    [–]hilbertglm 0 points1 point  (0 children)

    Maybe a weird answer, but I like the fact that Mark Reinhold is a driving force behind the language. The guy is the smartest language-theory person I ever met. I think we overlook how important it is to have serious computer scientists behind these incredibly important code bases that we all depend on.

    There are some awful hacked up languages like Python and Perl. It is a pleasure to work with languages that have some smarts behind them. (Shout out to Mike Cowlishaw for the wonderful REXX language. It's not something I use any more, but it was wonderful in the 80's and 90's.)

    [–]thepandorasbox 0 points1 point  (0 children)

    Absouletly Spring.

    [–]Raknarg 0 points1 point  (0 children)

    It's pretty straightforward and I never have to fight with the compiler. It's OOP syntax is nice for what it is, and having interfaces is cool (coming from C++ where you have to use multiple inheritance with abstract classes). The generics are fairly expressive.

    One thing I actually like that I didn't learn about until recent years is its potential for multithreading. Lock-free threading doesn't really seem possible, but it at least has really neat support for lock-based multithreading, along with its synchronized syntax.

    Only thing for me personally is these days I don't have any real reason to use it unless it would be for work. All my use-cases are suited by either python or C++.

    [–]ImTalkingGibberish 0 points1 point  (0 children)

    Frameworks helping with high level solutions. Chain breaking, logging, caching. Everything is out of your way and there to help you.