Lead based

Bit: a digit 0 or a digit 1Byte: each eight bits is a Byte, which is the smallest data storage unit. 1Byte = 8bit KB/MB/GB/TB/PB/EB/ZB Base 1024

JAVA language development environment

JVM (Java Virtual Machine -- implementing cross-platform) JRE (running Java environment, including JVM-- core libraries) JDK (Development kit)Copy the code

HELLOWORLD skips writing HELLOWORLD! At the command prompt

JAVA Integrated Development Environment Idea [Download Idea, register + Activate]
Java directory structure

create

Cn.huyingkeji.01.demo01 is used to create the package, and the actual service directory is created with “. “as shown in the following figure

#### problem A during the development process, create HelloWorld Java class, there is A problem, only display suffix is. Kt solution: create directory structure there is A number ’01’, in reference to the time is quoted! Change it to a string and it can be created normally

#### OVER

#### problem B * Error after compiling HelloWorld: Java: invalid source distribution: 14 Solution: — Appledemacbook-pro ~ % java-version portal #### OVER various shortcuts —- MAC support is terrible, all kinds of double binding, You have to find a MAC MARK.

PSVM sout keyword

Key features: 1, 2, pure lowercase letters with special color identifier: rigid requirements: type, variable, function name Are identifiers (English letters, 0-9, $, _ 】 can't begin with Numbers Can't be a keyword Soft requirements: the name of the class specification: the handwritten letter, behind each word capitalized (camel) variable name: The first letter is lowercase, followed by each word is capitalized (small hump) method name: same variable nameCopy the code
String constant "HelloWorld!!" 2, integer constants, directly written numbers, no decimal point. Eg: 1, 10, 100...... Floating-point constants: numbers written directly, with a small bookstore. 4. Character constants: A single character enclosed by a single quotation mark is a character constant. Eg: 'A', 'b', '9', 'medium' 5, Boolean constants: only two types of paper eg. true false 6, null constants: null. Represents does not have any dataCopy the code
Basic data types -4 types of 8 integer types Byte (1 byte) Short (2 bytes) int (4 bytes) Long (8 bytes) Float (4 bytes) Double (8 bytes) Char (2 bytes) Boolean (1 byte)Copy the code
Float intelligence is an approximate value, not an exact value. 3. Data range is not necessarily related to the number of bytes, eg: Float data is broader than long, but float is 4 bytes and long is 8 bytes. If you're using float, you need to suffix it with F, integers default to int and if you're using long you need to add an LCopy the code