Home TechnologyProgrammingJava Subscribe to RSS

What Is The Actual Difference Between Java And C++?

Answer Question

3 Answers - Sort by: Date | Rating

    Java is a purely object oriented programming language .Without classes we cannot write the program in java, but we can write the program in c++.
    0 0

    Dazzler 

    answered 3 years ago

      Java is a much more mature object-oriented language than C++. C++ was not designed from the ground up as an object-oriented language. It is essentially a modified version of the C programming language, with some object-oriented features inelegantly tacked on.

      Java ships with a large set of APIs while C++ does not. Java lacks multiple inheritance. Memory management is handled automatically in Java but manually in C++.

      In most contexts, C++ will offer substantially greater performance than Java.

      Java offers cross-platform compatibility at the binary level. C++ code, if written carefully, can offer compatibility at the source level, requiring recompilation on each platform. Realistically, however, in most cases, the source will also need to be adjusted somewhat.
      0 1

      Cian 

      answered 3 years ago

        C++ is an attempt to merge the fast execution speed of the C programming language with the object-oriented approach of programming by Java to give the best of both worlds.  Java provides a more robust framework for avoiding the common problems associated with programming languages that make direct access of memory like C, but has less flexibility in terms of complex structures such as mulitple inheritance that is in C++.  There are workarounds for each of the deficiencies in Java and C++, so the choice of which language to use would generally come from whether a person has done C programming before, in which case it would be easier to adopt C++.  Alternatively, if someone was taught an object oriented approach to programming, then Java is more ideal because you don't have to learn the ways C++ tries to structure the language and syntax to object-oriented programming.
        0 1

        S4074433 

        answered 3 years ago

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International