| 1. Sun, which originated in Java in 1994, did not initially show its unique advantages. Sun had once wanted to abandon the project. The leader of the loss. Java is the only to exist. At the end of 20th century. With the rise of the Internet. More and more applications of interactive design, the requirement of the cross-platform of programming language is more and more high. The designer found out that Java is exactly what it needs to be. So Java was on fire. 2009 The Java language was acquired by Oracle, but this does not affect the development of Java, more and more developers like to use Java as a development language. 2, JRE. Differences in JDKThe JDK is the Java SDK, which, as a program ape, must be installed on the computer to execute Java code with JDK talent compilation. The JRE is only Java's execution environment, the scope is smaller than the JDK. 3. Jvm,java virtual machine realizes the cross-platform of Java.
。
。。 4, the basic data type, eight kinds of types. String is not a basic data type.
byte type -128~127,8 bit.
char type 16 bit 65536, adopted Unicode encoding (universal Universal), for each language of each character set a unique binary encoding, more than 60,000 enough. int ShortLongfloatDoubleBooleanTest:byte b=35; compile correctlybyte b=130; compilation does not pass (the number of bits exceeding the byte type)Reason: The number implicitly feels the int type. And it will take its own initiative to convert the int type to short, char, byte (originally. Self-active type conversions are low to high) /*
Type-promotion issues in expressions
int a = 3;
Long B = 4;
Double d = 5.3;
int c = (int) (A+B); To do all the two-dollar operators (+-/*%), there is a problem with type promotion.
float f = (float) (A + D);
*/ Java is a language that always specifies the type of data (strongly typed), and the variable must specify the type (base data type). Reference data type).
The language of JS technology does not need to specify the type of variable |
Java origins and basic data types