Alibabacloud.com offers a wide variety of articles about java class naming convention, easily find your java class naming convention information here online.
Java Naming rules
Standardized purpose: to standardize the coding process and develop good behavior habits for future program development.
1. All project names are in lower case
2. All package names are in lower case
3. The first letter of a class name is capitalized. If the class name is composed of multiple wor
First, naming norms1, the project name all lowercase2. Package name All lowercase3. The first letter of the class name is capitalized, if the class name consists of multiple words, the first letter of each word is capitalized. Public class myfirstclass{}4, the variable name, the method name lowercase, if the name consi
Java Naming conventions1. The name specification in Java:(1) The package name is all lowercase: xxyyzz;(2) Class name Interface name: First Letter capital: xxxyyy;(3) Variable name and function name: The variable name cannot be a keyword; when multiple words are composed, the first letter is lowercase, the second word
Public classBasicdatatype { Public Static voidMain (string[] args) {/** Identifier: Used to name a variable, method, class, must begin with a letter, an underscore, a $ symbol. Combination of letters, underscores, numbers, $ symbols, and cannot be keywords * **/System.out.println ("--------------designator------------"); int$,_,a;//the correct naming intPeng = 12;//because of the Unicode encoding ins
Naming rules for packages, classes, methods, properties, constants in Java1: Package: Used to classify classes that do different functions, put them under different directories (packages), and package naming conventions: reverse the company domain name as the package name. For example, www.baidu.com for package name: each letter needs lowercase. For example: Com.baidu.test; The full name of the test
First, naming norms1, the project name all lowercase2. Package name All lowercase3. The first letter of the class name is capitalized, if the class name consists of multiple words, the first letter of each word is capitalized.such as: public class myfirstclass{}4, the variable name, the method name first letter lowerca
First, naming norms1, the project name all lowercase2. Package name All lowercase3. The first letter of the class name is capitalized, if the class name consists of multiple words, the first letter of each word is capitalized.such as: public class myfirstclass{}4, the variable name, the method name first letter lowerca
Java: Naming the Dainty
1. Class nameA class name usually ends with a noun. And in the class name to reflect whether it is to save data primarily or to provide the main function. For example Connectionbuilder This class we can al
I. Typographical specifications1: when assigning values to variables during initialization, = needs to be aligned, so it looks neat and comfortable.[Java]// BeforePrivate Char joe = 'job ';// After2: Add a space between keywords or variables and operators:[Java] view plaincopyFor (int I = 0; I Int iCont = 1;}3: Empty lines are added between relatively independent code blocks and blocks. For example, empty l
Java Package names are composed of lowercase words, the class name is capitalized, and the path of the package conforms to the definition of the developed system module, such as production to production, material to material, base class to basic class. In order to see the package name to understand which module, so dir
Java Naming Conventions-general Linux technology-Linux programming and kernel information. For details, refer to the following section. What are Java Naming Conventions?
Answer: 1. Use the complete descriptor to accurately describe variables, fields, or classes.
For example, the name can be FirstName, GrandTotal, or
First, naming norms1, the project name all lowercase2. Package name All lowercase3. The first letter of the class name is capitalized, if the class name consists of multiple words, the first letter of each word is capitalized.such as: public class myfirstclass{}4, the variable name, the method name first letter lowerca
1. Project name All lowercase2. Package name All lowercase3. The class name is capitalized in the first letter, if the class name has more than one word, the first letter of each word is capitalized. 4. Variable name, method name first letter lowercase, if the name consists of multiple words, from the second word, capitalize the first letter of each word. 5. Constant name All uppercase6. All
main function is to instantiate the implementation class object and return the object to invoke the method to implement the business logic operation. The factory class ensures that even modifying the methods in a class does not affect other classes when the system is maintained at a later time.⑧ constructs a exception that defines a
about naming conventions: 1, literally. The name is meaningful and can express meaning. 2, avoid misleading, avoid giving misleading elements, such as xxxlist. 3, make a meaningful distinction, avoid using product,product info and productdata at the same time. All the crap is redundant. 4, use the read-out name. 5, use a searchable name. mainly for constants. 6, avoid using encoding. Avoid using prefix m_des and type encoding phonestring. 7, the
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,
I. Three major mechanisms1. JVMActs as a translator and translates. class files into commands that can be read by the underlying operating system to implement cross-platform Functions, shielding different underlying operating systems2. Garbage Collection MechanismProgramThe user does not need to care about memory management, and the spam will be automatically recycled.The garbage collection time is not fixed. Instead, garbage collection is performed i
If there is only one class in the source code, the class must have the same name as the filename. (I think the reason for this is that in every public method, only one Mian function represents the main entry of the program)When the class is inconsistent with the file name, the compiler has an error: Fault: The main class
Common Naming conventions:Packages: Similar folders for distinguishing the same class names (lowercase)Single-stage: for example:studentMultilevel: For example:cn.studentClass or interface:One word: Capitalize the first letter of the word, for example:StudentMultiple words: Capitalize the first letter of each word, for example:HelloWorldmethod or Variable:A word: The first letter of the word is lowercase, f
Some of the named specifications in Java:1. Package-lowercase letters-for example COM.APPLE.QUICKTIME.V22. Class-Uppercase, mixed case-for example, class Image3. Interface-Similar to class, preferably I start-for example interface ICar4. Method-generally verbs, mixed case, first letter lowercase-for example runfast ();
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.