Basic concepts and java Naming rules in 0_java

Source: Internet
Author: User

First, we use an image to illustrate what is a class, object, integration, and polymorphism.

 

The following uses another image to illustrate common naming rules in Java:

Java Naming Convention example Program

/*** @ (#) ExampleProgram. java *** @ GYL * @ version 0.00 1000/0/00 */public class ExampleProgram {// 1. class name starts with uppercase, followed by the first letter of the word String theName; // 2. the variable name starts with lowercase and the first letter of the subsequent word is int age. // 2. variable name starts with lowercase // 4. keyword (int) All lowercase final int A_VALUE = 10; // 3. define all constants separated by uppercase letters and underscores (_) void introduceSelf () {// 2. method names start with lowercase letters, followed by uppercase letters System. out. println ("self-introduction ");}}

 

 

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.