Answer the question
In order to leave comments, you need to log in
For which tasks is Java better suited than C++?
I'm taking a course in C++. Does it make sense to look more towards java in today's realities? Is it true that knowing C++ you can quickly switch to any OOP language?
I read that C++ has more memory management levers than Java. Due to this, java programs run slower. Is it really that important? And if so, where is it? Thanks
Answer the question
In order to leave comments, you need to log in
Whether to look either way depends on what you want to do. You can switch from any language to any, and C++ is nothing special here. I even have an example when the transition from C ++ to Java was very bad for the team.
Yes, in C++ you have to manage memory, it's a great way to shoot yourself in the foot, and that's why the current advice is to move away from raw pointers to shared/unique/etc_ptr.
In Java, the garbage collector, yes, but this has not been a problem in ordinary applications for a long time. Memory management in C++ is tricky.
Methods from java bytecode are compiled into platform code at runtime, which speeds up a lot.
For tasks developed on one platform and working on others. In particular, I wrote modules (without graphics, of course) for the FMS RF server on Windows (JIdea), and they worked, without the slightest complaint, on the IBM server via Unix. Java was the 4th version)))
In general, for cross-platform applications, Java is still the best language, or rather, the execution environment. Yes, C or C ++, if you do not use various unnecessary tricks and bells and whistles, you can compile on one platform or another without much effort. But for the program to go simply by transferring binary files, this is for Java.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question