Java_day01 Java Basics

Source: Internet
Author: User

1. Common DOS Commands:
-dir lists the files and folders in the current directory
-MD Create Directory
-RD Delete Directory
-CD into the specified directory
-CD. Will fall back to the top level directory
-Cd/return to the root directory
-Exit DOS command line


2. JDK (Java Developer kit) contains Java development tools and JRE
The JRE (Java Runtime Environment) contains the core class libraries required by the JVM and Java programs, etc.
The JVM (Java virtual machine) is a VM that masks the difference between the underlying operating platform ("Compile once, run everywhere")


3. Define a legal identifier:
-English/Digital/_/$
-numbers can not start without
-may not be used but can contain keywords and reserved words
-Case-sensitive, unlimited length
-Cannot contain spaces


4. Java Naming conventions:
-Baoming: All letters are lowercase
-Class Name Interface name: All words capitalized in the first letter
-Variable name and function name: first letter lowercase, followed by the first letter of the word
-Constant name: All letters capitalized, between words with _ connection


5. Variable scope: Valid between a pair of {}


6. Data type: Basic data type (8 kinds)/reference data type
-Float type defaults to double


7. Basic data type conversions: char→int→long→float→double
Byte→short↑
-Automatic conversion of data types to the maximum capacity when calculating multiple types of data
-Byte, short, char does not convert to and from each other, the three are converted to int type first
-the need to force the type conversion to a small capacity of large capacity
-the string cannot be converted directly to the base type
-Boolean cannot be converted to a different data type


8. If a Java file has a class declared in public, the Java file must have the same file name as the class name


9. You can declare multiple classes in a Java file, but only one public class


10. The array is a reference type and is a collection of multiple data of the same type


Java_day01 Java Basics

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.