Java4android Development Tutorial (iv) Java variable _android

Source: Internet
Author: User

What is a variable?

Used to store information in your computer, and DECLARE statements to indicate where and what space you want to store.

Declaration method and assignment of variables

Semicolon: Statement End flag Assignment Number: assign = to the right of the value to the left of the variable

What data types are variables?

Naming syntax specification for variables (legal)

1. Begin with letters, underscores, or dollar signs followed by letters, underscores, dollar signs, or numbers.

2, Java variable name does not have a length limit.

3, Java variable name is sensitive to case.

Hump nomenclature (correct)

1, the name of the variable to choose meaningful English words, do not use pinyin or pinyin abbreviation.

2, the variable name consists of a word is all lowercase.

3, variable name consists of multiple words, starting with the second word of the first letter capital

A valid variable name is not necessarily the correct variable name

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.