IMPORTANT: Please read our Guide To Quality Writing before you begin posting!

Dismiss Notice
Please note that we are only approving writers from the US, UK and Canada at this time.

What are major differences between C++ and Java?

Discussion in 'Programming' started by a1youb, Dec 5, 2017.

  1. a1youb

    a1youb New Member

    Joined:
    Dec 5, 2017
    Posts:
    10
    Likes Received:
    1
    Gender:
    Male
    The most important difference is that Java is a memory-safe language, whereas C++ is not. This means that errors in Java programs are detected in defined ways—for example, attempting a bad cast or indexing an array out of bounds results in an exception. Similar errors in C++ lead to undefined behavior, where instead of raising an exception or crashing, your program might keep running and crash later or even give the wrong answer or behavior. Overall, the presence of unsafe features in C++ such as unchecked casts, pointer arithmetic, and manual memory management (delete) means that C++ programming is much more error-prone that Java programming.
     
  2. M.Kaleem Nisar

    M.Kaleem Nisar New Member

    Joined:
    Dec 14, 2017
    Posts:
    4
    Likes Received:
    0
    Gender:
    Male
    On the contrary, in C++ there is no such root hierarchy. C++ supports both procedural and object oriented programming; therefore, it is called a hybrid language.C++ suppoets all pointers, templates, operator overloading while Java does not support pointers, templates, unions, operator overloading, structures etc.Java is basically object oriented programming.


    Although C++ has large usage but Java has also its importance. In most of games the language uses is Java
     
  3. Jezreel

    Jezreel New Member

    Joined:
    Apr 28, 2018
    Posts:
    10
    Likes Received:
    0
    Gender:
    Male
    C++ and Java Programming language is almost the same. but there are still various differences you can see on each language. For example, Java supports documentation comments,but C++ Don't, C++ was mostly used in developing Video Games with high Graphical concern. C++ has GOTO statement but Java don't have. there are still differences in this two language but this differences does not really affect on how could you use this programming languages.if there is a difference between this two, that will be so few. what i can say on this question was, this two programming language are almost the same. this two are mostly used for making desktop applications.their syntax are almost the same.
     

Share This Page