zoukankan      html  css  js  c++  java
  • List differences between JAVA and C++

    JAVA C++
    Java is a true and complete object oriented language. C++ is an extension of C with object oriented behavior. C++ is not a complete object oriented language as that of Java.
    Java does not provide template classes. C++ offers Template classes.
    Java supports multiple inheritance using interface. C++ achieves multiple inheritance by permitting classes to inherit from multiple classes.
    Java does not provide global variables. Global variables can be declared in C++.
    Java does not support pointers. C++ supports pointers.
    In Java, destruction of objects is performed in finalize method. In C++, destruction of objects is performed by destructor function.
    Java doesn’t provide header files. C++ has header files.
    • Java runs in a virtual machine.
    • C++ natively supports unsigned arithmetic.
    • In Java, parameters are always passed by value (or, with objects, their references are passed by value). In C++, parameteres can be passed by value, pointer, or by reference.
    • Java has bulit-in garbage collection.
    • C++ allows operator overloading.
    • C++ allows multiple inheritance of classes.
  • 相关阅读:
    压测 正则 性能分析
    时间复杂度 根号n
    务端如何防止重复支付 架构文摘 2021-05-02
    工具大于约定和文档
    千亿级公司低代码平台的测试体系介绍
    疑惑 题解
    计算几何相关总结
    树 题解
    矩阵加速相关总结
    loj6274 数字 题解
  • 原文地址:https://www.cnblogs.com/phonism/p/3664451.html
Copyright © 2011-2022 走看看