Java's three major mechanisms, naming conventions, and brief descriptions of Data Types

Source: Internet
Author: User

I. Three major mechanisms
1. JVM
Acts 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 systems
2. Garbage Collection Mechanism
 ProgramThe 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 in a timely manner.

System. GC ();
Runntime. GC ();
3. bytecode validator
Semantics: whether the. Class file is damaged or whether the data type matches
Whether the stack overflows ....

 

Ii. Naming rules

1. Class Name and Interface Name: the first letter of each word is capital class myfreind interface weacpon
2. Fields, methods, and objects: lowercase letters of the first word, and other upper-case Boolean iswoon
3. Package name: All use lower case letters
4. constants: all are in uppercase.

 

Iii. Data Types

Two big data types in Java:
1. "Raw" (basic) data types used for scientific computing
Byte (8-bit) Short (16) int (32) Long (64)
Float (32) double (64) Char (32) Boolean

Note: Char and INT have the same length and can use char c = 'a'; int B = C + 12;

2. Reference data types used for Java surface object programming;
Reference Type)

 

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.