Java variables, constants, operator symbols

Source: Internet
Author: User

Declaring variables individually can increase the readability of your program.

Many programmers like to add a or V before a declared variable, plus C before a constant, plus a type shorthand for it, which is a good habit to support.

Example: String vstrname;

It is best to initialize a variable declaration.

The declaration of a constant is final, with the customary constant name capitalized. The declaration cannot be changed, and if you want to declare a constant that is used in more than one method, it is static final.

Const is used in C to declare constants, but this is just a reserved word in Java and is not currently used.

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.