C language Learning--c and Java language different points

Source: Internet
Author: User

There is a Boolean data type in Java, True is true and False is false. Also, only Boolean values can be placed in the if () brackets.

C's basic data types are basically consistent with Java, but C has more pointer types. Pointers are the focus of the C language.

It is important to note that Java defines global variables automatically to help you to complete the initialization, the number variable will automatically assign the 0,char type variable will automatically assign ' 0 ', object variable pairs are automatically assigned null. When defining a local variable, Java does not automatically initialize it but error.

C automatically assigns 0 when defining global variables, and random numbers are automatically assigned when local variables are defined. (c is a weak language, in some places it will not error, it makes it difficult to find errors.) )

Resources:

Http://www.cnblogs.com/mjios/archive/2013/03/13/2957946.html

C language Learning--c and Java language different points

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.