Naming conventions for variable and identifier names in Java

Source: Internet
Author: User
Tags float double switch case try catch java keywords
  • Variables are stored in memory address, when a variable is defined, we can find the memory address through the variable name, you can modify the value of the memory range.
  • Naming conventions for identifiers: initials: Letters, underscores, $ symbols, remainder: Numbers, letters, underscores, $.
  • Identifiers should avoid keywords inside Java
  • If the variable name is made up of multiple English words, it needs to be named as a camel rule. The initial letter should be lowercase.
  • Java keyword, the Java language has 51 keywords, you cannot use these keywords to name classes, variables, and method names. The Java keywords are as follows:

Array type: int long short byte boolean float double Char class interface

Process Control: If else do and for switch case default break continue return try Catch finally

Modifier: Public protect private final void static STRICTFP abstract transient synchrnoized volatile native

Action: Package import throw throws extends implements this super instanceof new

Other.

Naming conventions for variable and identifier names in Java

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.