The difference between Java and c++,c and C + +

Source: Internet
Author: User

Let's start by analyzing the differences between Java and C + +:

Java is a purely object-oriented language, and C + + is a language based on object-oriented procedures.

Java has a garbage collection mechanism. Its syntax is a subset of C + +, which has C + + in Java. and C + + Some Java does not have all.

Java also includes built-in types and their own definition types. In the local open space, after the ability to use the value. The types of Java are treated as objects. No operator. No self-increment action, treat operator as function
Java also has a garbage collection mechanism. Reflection mechanism.

Then analyze C and C + + differences:

C has only member variables, there is no way to say, and C + + has its own member variables and member functions;

The latter has references to function overloads. Template (code at compile time), operator overloading.

The latter function has default values. And the former did not.

The difference between Java and c++,c and C + +

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.