Java is a strong language.

Source: Internet
Author: User
Java is a strongly typed language-general Linux technology-Linux programming and kernel information. For more information, see the following. This chapter analyzes three basic elements in the Java language: data types, variables, and arrays. Just like all modern programming languages, Java supports multiple data types. You can use these types to declare variables or create arrays. You will see that Java's processing methods for these projects are clear, effective, and consistent.
First, we need to declare the importance of a strong-type Java language. Indeed, Java's security and robustness come partly from the fact that it is a language of this type. Let's see what this means. First, each variable has a type, each expression has a type, and each type is strictly defined. Secondly, all numeric values, whether directly or through method calling, must be checked for Type compatibility before passing through parameters. Some languages do not automatically force the check of Data Type compatibility or convert conflicting types. The Java compiler checks the type compatibility of all expressions and parameters to ensure that the types are compatible. Any type of mismatch is incorrect. The error must be corrected before the compiler completes compilation.
Note: If you have a background in C or C ++, you must remember that Java requires stricter data type compatibility than any other language. For example, in C/C ++, you can assign a floating point value to an integer. Not in Java. In C, there is no mandatory Type check between a parameter and an independent variable. In Java. At first, you may find Java's forced type check a little complicated. But remember, in the long run, it will help you reduce the possibility of program errors.

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.