Is Java a trend?

Hey Sup Forums, I used to use c and c++ as programming language but I have to Receive a java training for my new job. I don't understand why people underestimate c++ and overrate Java this much...

Is there any true advantages that makes Java better or is this only a trend that will evolve to a new language in the next few years?

Tl;tr : why people do prefer Java to C++ ourdays

Both java and C++ are shit.

So what's dope to you?

>Tl;tr : why people do prefer Java to C++ ourdays

Because you can write 300+ lines of boilerplate code making zero progress in solving whatever task you were assigned and either get enough partial credit to pass the cs course OR convince your boss that you are doing productive work while you preemptively slander your coworkers that they aren't doing enough.

garbage collection is pretty neat but that's the only thing i can come up with, and i guess it's convenient that it manages pointers for you. it's more idiot-proof than c++ in some ways but it's also batshit insane in other ways--like its type system is fucking bonkers and really easy to break

There's std::unique_ptr (and std::shared_ptr and std::weak_ptr for multithreading) if you want automatic memory management. Just remember to pass the raw pointers to functions that your not giving ownership to.

So the code is more reusable? Is that your point?


Yes the garbage collector is a very nice implementation in Java. So does this mean companies prefer to have anslower but idiot-proof cose rather than a faster application?

>a trend
Of a few decades yes. Java has a few innate abilities, such as the JVM, which allows it to be ran in any platform supporting the JVM.

Jobs requiring higher level access find Java a great tool as it not only abstracts non-necessary close-to-hardware operations and allows you to focus on only the application logic.

Third, Java has an enormous community, tons of libraries and frameworks and an established trust in the enterprise.

oh, cool didn't know about that. i'm still an undergrad and quite frankly i don't feel like i've learned much since i've gotten into the higher level stuff, it's so bogged down in theory

I got your points. But as I read these points, that's not a tree, because this would be hard to move out Java from his godlike state...

>So the code is more reusable? Is that your point?

No, it's worthless. Nobody wants factories that make factories that make factories ... that put boxes into boxes which are put in other boxes ... that decorate ... blah blah blah ... classes.

Couple reasons:
1. Java is seen as "safer" because it guarantees a 5 page long stack trace followed by a program stop when you fuck up, whereas C++ has "undefined behaviour" that may do whatever the fuck it pleases when it enters an inconsistent state.
2. Java is seen as more "productive" because of how easy it is to pull 2GB worth of framework from maven or whatever. Downside is bloatware, obviously, which is generally seen as something you can throw more cpu/ram at to solve the problem (until you can't...)
3. C++ teaching usually sucks in academia. I mean I'm sure Java teaching isn't great either but there is a world between good, modern C++ and the "C with classes" they teach in universities
4. Java is still seen as "new" by 50+ yo managers so they let people do whatever the fuck they want, whereas C++ can still look like C if you squint hard enough, leading to management interference because they think they still "get" it
5. Java is easier to port on other systems as long as you have a JVM, whereas C++ has multiple compilers with various levels of deviation from the standard. This has been improved a lot in the past few years, if gcc or clang or msvc is available you're probably ok nowadays

I imagine it's much harder to find talented C or C++ programmers. They should be university standards IMO but somehow they're not ubiquitous like Java is

>Java is easier to port on other systems as long as you have a JVM
>a JVM
>a

Lies and slander. It's a fucking nightmare to get code written on one JVM to run on a different JVM.

It doesn't spit out dozens of lines of incomprehensible error messages when you touch something with templates.

Thanks for this user, this is very interesting to me


This make sense


This don't happen in c if you can speak fluent binary

Of course it doesn't happen in C. It doesn't have templates.

Thank Minecraft, I'm not even kidding, many android devs have started as MC modders/server admins.
Also thank Andoid for endorsing it furtherly giving all these kids something to use for profit.

Never tried it, but I meant Sun/Oracle JVM is available on all major OS (and also dead things like AIX and Solaris)

Sounds interesting, but I never used this

That's the default one you get from the Java/Oracle website

Okay user ;)

>So does this mean companies prefer to have anslower but idiot-proof cose rather than a faster application?

When it being faster doesn't matter and just takes more time to implement, and a company has this thing called a """"""""budget""""""", and employees usually cost an amount of money per hour.

Does any of this make sense to you?

javascript is alright

>Thank Minecraft, I'm not even kidding, many android devs have started as MC modders/server admins.

that really explains the poo known as the android ecosystem

A massive idiot appears

Hi

Java is more focused on io than c++ and makes it easier to develop server stuff for enterprise IT. Also kind of easier to program in thanks to gc. The tools are also comfy, there are plenty of static analysis stuff and various overengineered uml code generators, documentation generation, code test coverage analysis and so on.

If you're getting into it make sure you use spring and enjoy not writing another line of sql in your life thanks to comfy autogenerated orm mappings.

Ok, I see. Thanks user

Spring is the most overbloated and coupled thing in the world.
Then again some apparently like this...

It's bloated but then again you're developping in java anyways ..
The point is to get stuff working quickly not to build minimalistic systems.

What do you prefer to use that's not as bloated as spring?