PDA

View Full Version : uses for java



h_howee
09-08-2007, 01:34 PM
I've just started my CS course last week but instead of C++, we're doing Java this year...
It's syntax is quite similar to that of c++ so I'm not having any trouble adapting to it. I know the advantages and disadvantages Java has over c++ but when would I want to use Java? What kinds of jobs is it suited for? It wouldn't hurt to learn a new programming language, I just don't want to spend too much time on something I'll never need
Also, does anyone know of a Java forum that's as active as cboard?

indigo0086
09-08-2007, 01:41 PM
java has a large library and a lot of standard features not seen in the STL such as sockets and multithreading, it's multiplatform by nature, so no need to compile for seperate operating systems. It has internal "garbage collection" so instead of having to personally manage dynamically allocated pointers to objects, java does all the cleanup for you.

As for uses, it depends. Professionally you wouldn't be hurt with knowing java, and as a hobby you can find a ton of things to do with it, as well as C++.

Happy_Reaper
09-08-2007, 01:52 PM
I can't say for sure anymore, but I know that companies who used to make software for cellphones used to use Java extensively.

@nthony
09-08-2007, 02:46 PM
You'd use it any time speed/effeciency is not a critical factor but uniform, cross-platform behaviour is, along with more maintainable code (unless the original coder is truly trying to be a dunce), and larger libraries (as well as more explicit security/exception handling).
That being said, I've been through 3 courses that emphasized Java and only 1 that touched on C++ (and that was only AFTER we had gone through Smalltalk which only left about 2 weeks for C++.... talk about f'n useless...). I don't know why some universities insist on pushing Java (perhaps some political agenda on the prof's part), but personally, I would rather they rush through Java and focus in-depth on C++, as the former is a lot easier to "pick-up" along the way and the latter alot more condusive to self-foot-shooting.

laserlight
09-08-2007, 07:38 PM
Also, does anyone know of a Java forum that's as active as cboard?
Java Ranch (http://www.javaranch.com), but I am not a contributor there so I cannot say exactly how good it is.

CornedBee
09-09-2007, 03:51 AM
The Ranch is good. Very big, very active.

Prime areas for Java are cross-platform RAD development, big server-side applications (thanks to the excellent J2EE system), and J2ME mobile device applications.

h_howee
09-09-2007, 08:33 AM
Java ranch looks good, thanks

So Java would be good for anything but real-time games?

CornedBee
09-09-2007, 08:42 AM
And other really computation-heavy tasks - 3d design apps, for example, should at least have the final rendering implemented in some optimized, native form.

Oh, and really low-level stuff like device drivers, of course.

indigo0086
09-09-2007, 10:29 AM
Eventually computers will get faster, as will the virtual machine, and while it won't be as fast as compiled and assembly languages, the performance will be increased. That is assuming the vm goes through dramatic changes over the years.

CornedBee
09-09-2007, 12:07 PM
Yes, but the performance of native code goes up as computers get faster, too. That one's a none-argument for heavy-duty computation jobs.
If it's just about being fast enough (for whatever purpose - keeping up the framerate in games, for example) then yes, it's an argument. If you want to squeeze every cycle out of the system, however, statically optimized native code (or even hand-coded assembly if you have to) is the way to go.