javase (java principle of cross-platform, setup the development environment, the basic data types, object-oriented features)

First, the principle of cross-platform java

1, since the operating system supports instruction set is not exactly the same, so that our program will execute different code on different operating systems. java developed for different operating systems and the number of bits of java virtual machine to mask the differences in the various operating systems, providing a unified interface (java API), for java developers only need to install the corresponding different on different operating systems java virtual machine, then just follow the java specification Java program, you can run a java program on all operating systems. That java to shield the different systems by different systems, different versions, different number of bits of java virtual machine instruction set differences outside to provide a unified interface.

2, cross-platform and non-cross-platform

(1) non-cross-platform:

 

 For different operating systems to develop different interfaces, respectively.

(2) Cross-platform:

 

 

Second, the development environment to build

1, suitable for the development of a corresponding version of the JDK (need to configure the environment variables, the JDK integrated into eclipse or IDEA)

2, the corresponding version of eclipse or IDEA (provided Workspace, coding format)

3, web server (tomcat integrated into eclipse or IDEA)

 

Third, the basic data types (four eight kinds)

Integer: byte        . 1 (byte) 

     Short       2 

     int         . 4 

     Long        . 8 

 

Float: a float      . 4 

       Double     . 8 

 

Character: char        2 



Boolean: Boolean     . 1 Default: false

 

Fourth, the object-oriented features which

1, there are four basic features

Encapsulation, inheritance ( https://www.cnblogs.com/zhai1997/p/11280869.html )

Polymorphism ( https://www.cnblogs.com/zhai1997/p/12416447.html )

Abstract: find similarities and commonalities place between things, then this thing will be classified as a class, for example: students have the same properties student number, name, sex, etc., can be abstracted out of a class of students

 

Guess you like

Origin www.cnblogs.com/zhai1997/p/12436927.html