After learning this long time of Java just started to feel very simple, but the logic is very strong behind, so still want to continue to refuel, the following is some basic things
Using the Eclipse tool
Write program basic naming
Class Name: Capitalize the first letter of each word
Variable name: The first word is all lowercase, other words are capitalized in the first letter
Variable name requirements: 1. Initials: Must be national language, underline and money
2. Other letters: first letter + number
Note: The initial value must be assigned before the variable is used
Auto Convert: 1. From small range to large range, automatic conversion
2. From large range to small range, cast
3. Any type of "encounter" string, automatically converted to a string
judgment Equality: basic type with = =; Reference type with equals
Java Virtual machine principle:
Java is a Java Virtual machine (JVM) that installs a Java parser for any operating system. Write once and run everywhere.
Java cross-platform, virtual machines are not cross-platform, bytecode is run by the JVM.
Jvm:java Virtual Machine
Jre:java Runtime Environment
Jdk:java Development Kit Java Development tools
Java Cross-platform principle:
The JVM itself is not cross-platform because there are different virtual machines on different platforms that interpret the same byte-code as a viable machine on different platforms
Code, so Java bytecode is a cross-platform
Java is really running a byte code (. Class) file
One. Java file, the file name must match the class name of the public class
One. Java file, you can use only one public class, but you may have more than one class
One or eight basic data types (native data types)
The largest of the numeric types is double, and the largest of all is string
Note: The following numbers represent the number of bytes
1.byte byte Type 1
2.short Short-Integer 2
3.int Integral Type 4
4.long Long Integer 8
5.float floating-point type (single precision) 4
6.double floating-point type (double precision) 8
7.char Character Type 2
8.boolean Boolean type 1/8
Ii. reference numeric type (object data type)
Other than the above eight data types are reference data types
The most common is the string
Basic Java Knowledge