What Nico said. Learn java if you want cross platform applications. But again;
Saying Java is good because it works on all operating systems is like saying anal sex is good because it works on all genders. ~The Pope
Originally Posted by Hassan
What Nico said. Learn java if you want cross platform applications. But again;
Saying Java is good because it works on all operating systems is like saying anal sex is good because it works on all genders. ~The Pope
Lol
I actually already know some C++ because I read books and stuff
Originally Posted by Nico
Better learn C++ and its more easy to learn any language after that. Java isnt that useful.
What.....?
Originally Posted by Takari
I'm going to start learning Java .
Is it worth it ?
Is it hard ?
It's worth it, definitely. And no, it's not "hard", though its not a walk in the park. You will need to invest time into it.
Originally Posted by Nico
Better learn C++ and its more easy to learn any language after that. Java isnt that useful.
Java is incredibly useful. It is ubiquitous. It is amazingly useful, and is used at almost every engineering company I've seen. It's arguably more useful than C++ in terms of speed of development, portability and on par in terms of execution speed.
Nope. Native C++ has unparalleled speed.
Dont be mad because I said that Java isnt that useful. The only thing I would Java use for is writing mods for Minecraft, could do the rest in C++/BlitzMax. Its just my opinion
Originally Posted by Hassan
Nope. Native C++ has unparalleled speed.
Assuming that:
You don't leak memory;
The amount of time saved by having your code execute milliseconds faster offsets the additional time you spend coding in C++ because of its lack of standard libraries (eg. crypto, net, graphics), long compile times and unhelpful error codes; and
Your application is actually dependent on speed in the first place.
Originally Posted by StackOverflow resident Rex Kerr
In practice, you're likely to find your naively written Java code outperform your naively written C++ code in these situations (all of which I've personally observed):
Lots of little memory allocations/deallocations. The major JVMs have extremely efficient memory subsystems, and garbage collection can be more efficient than requiring explicit freeing (plus it can shift memory addresses and such if it really wants to).
Efficient access through deep hierarchies of method calls. The JVM is very good at eliding anything that is not necessary, usually better in my experience than most C++ compilers (including gcc and icc). In part this is because it can do dynamic analysis at runtime (i.e. it can overoptimize and only deoptimize if it detects a problem).
Encapsulation of functionality into small short-lived objects.
In each case, if you put the effort in, C++ can do better (between free lists and block-allocated/deallocated memory, C++ can beat the JVM memory system in almost every specific case; with extra code, templates, and clever macros, you can collapse call stacks very effectively; and you can have small partially-initialized stack-allocated objects in C++ that outperform the JVM's short-lived object model). But you probably don't want to put the effort in