What is the difference between JAVA and c++ ?


  • 0
    A

    Both Java and C++ support OOP, but are not OOP languages.
    C++ gives you all possible styles of programming: procedural, OOP, metaprogramming, functional, etc.

    Java is somewhat limited in this area.
    link text


  • 3
    R

    I think there are two main points between and c++

    1. java eliminate multiple inheritance while c++ still has, java uses implements multiple interfaces to replace multiple inheritance in c++
    2. java(specific JVM) has garbage collector to manage and recycle memory automatically, programmers don't need to care about the memory release and management. C++ on the other hand, programmers have to release memory after finishing using the object manually.

  • 0
    T

    Java is platform-independent language, while C++ is not: Java is compiled to so called "byte-code", while C++ is compiled directly to machine code


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.