Header Ads

  • Breaking Now

    How is Java different from C++?

    Java is a platform independent, object oriented language while C++ is having some of its features from C, which is a procedural language so it is not pure object oriented. Even Java is not 100% pure object oriented.

    1. Pointers are supported in C++ while not in Java. The memory management is done automatically with help of part of JVM called Garbage Collector.
    2. Multiple inheritance is not supported in Java but supported in C++.
    3. There are no structures and unions in Java.
    4. There is no scope resolution operator in Java (::).
    5. There are no destruction in Java like C++.
    6. There is no virtual keyword in Java because all non-static method use dynamic binding.

    Post Top Ad

    Post Bottom Ad