Thread: uses for java

  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267

    uses for java

    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?

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    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++.

  3. #3
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    I can't say for sure anymore, but I know that companies who used to make software for cellphones used to use Java extensively.
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  4. #4
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    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.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Also, does anyone know of a Java forum that's as active as cboard?
    Java Ranch, but I am not a contributor there so I cannot say exactly how good it is.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    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.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    Java ranch looks good, thanks

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

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    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.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    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.

  10. #10
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    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.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed