Results 1 to 5 of 5
  1. #1
    jankidudel is offline Member
    Join Date
    Jul 2010
    Posts
    5
    Rep Power
    0

    Question Is it worth for c++ programmer to learn java?(and about speed difference).

    Hi, many people are saying that java is faster and much more otherwise.
    So how it is exactly? Please answer only if you are 100% confident about that.

    II question. Why Java is so popular, while we have C++ . For rich libraries, ease to learn/use(compared to C++), more beautiful language? Thank you for answers and if you can write without unnecessary information what you get from internet. ;)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by jankidudel View Post
    Hi, many people are saying that java is faster and much more otherwise.
    So how it is exactly? Please answer only if you are 100% confident about that.
    No one will be able to answer this question then since your criteria for certainty is unrealistic. Seriously.

    II question. Why Java is so popular, while we have C++ . For rich libraries, ease to learn/use(compared to C++), more beautiful language?
    There's no simple answer for this, but I can tell you that it is much harder to shoot yourself in the foot with Java compared to C++.

    Thank you for answers and if you can write without unnecessary information what you get from internet. ;)
    WTF?

  3. #3
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    I will throw in my two cents worth, c++ works closer to the os, java imitates the os with its virtual machine so on average c++ programs will be faster, writing programs might be faster in java but that is most likely determined by your knowledge of either language. Java does not let you away with things like c++ does. E.g. array bounds are not caught at compile time. C++ i guess has more confidence in the programmer ( that is not necessarily a good thing :D )

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,436
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    I will throw in my two cents worth, c++ works closer to the os, java imitates the os with its virtual machine so on average c++ programs will be faster
    That depends: if a program doesn't need to make many OS calls a Java program can be faster; Java runs in three steps: Java source code -> Java byte code -> machine code, while C/C++ transform the source in two steps: C/C++ source code -> machine code; the three step transformation results in better (faster) code; an example: I wrote a Revised Simplex algorithm once in both C++ and Java; it's just a lot of number crunching in sparse matrixes. The Java version was faster in almost all my testcases.

    kind regards,

    Jos

  5. #5
    Arnold is offline Member
    Join Date
    Oct 2009
    Location
    Rotterdam
    Posts
    52
    Rep Power
    0

    Default

    Not to get off topic, but since you are a c++ programmer, could you maybe explain me in a PM how to install the GCC compiler?
    It's not as easy as installing the JDK.

    As for the topic: You might find that Java has limited capabilities compared to c++. But it does come in handy if you want to make a browser application.

Similar Threads

  1. How do you learn java??
    By low224 in forum New To Java
    Replies: 1
    Last Post: 12-07-2008, 08:42 PM
  2. Looking to learn Java.
    By Pwhheee in forum New To Java
    Replies: 2
    Last Post: 11-21-2008, 06:16 PM
  3. Replies: 0
    Last Post: 08-05-2008, 10:47 AM
  4. Sr. J2EE Applicatin Developer; Dallas-Ft.Worth
    By ScottSearch in forum Jobs Offered
    Replies: 1
    Last Post: 04-23-2008, 05:23 PM
  5. C++ programmer wants to learn java very fast...
    By joe saunders in forum New To Java
    Replies: 5
    Last Post: 01-05-2008, 12:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •