Dabai became the first day of the Java software siege lion (DOS and java features, object-oriented)

Java basic theory

1. Common Dos commands in window

Enter cmd
-cls clear the screen
-exit Dos command to exit the current window
-dir lists all files in the current sub-directory / subdirectory
-cd command
* cd command represents: change directory change directory []
use *: cd directory path
- cd... Back to the parent directory-cd
/ Back to the following directory
-how to switch the drive letter?
c: Enter
d: Enter

2. The file extension must end with .java

3. The history of Java language development

java语言诞生于1995年。
-什么是JDK?
	Java开发工具包
	做Java开发必须安装的一个工具包,可从官网下载。
	*Java目前包括三大块:
	-JavaSE(Java标准版)
	-JavaEE(Java企业版)
	-JavaME(Java微型版)
	其中JavaEE是基础,主攻方向是JavaEE方向。

4. Java language features [open source, free, pure object-oriented, cross-platform]

Simplicity: Relatively speaking, for example, Java does not support multiple inheritance, C++ design supports multiple inheritance, and multiple inheritance is more complicated.
There are pointers in C++, and the concept of pointers is shielded in Java. So Java is simple.
The bottom layer of the Java language is implemented in C++, not the C language.

Object-oriented: Java is purely object-oriented, more in line with people's thinking mode, and easier to understand.

What is object-oriented?

Encapsulation : Encapsulation is a method of privatizing the properties of an object while providing some properties that can be accessed by the outside world.
Inheritance :
java is multi-single inheritance, the
subclass has the non-private properties and methods of the parent class. The
subclass can have its own properties and methods, that is, the subclass can extend the parent class and the
subclass can implement the parent class in its own way Method
polymorphism : the reference of the parent class points to the child class

Portability:
What is portability? (Cross-platform)

Java程序可以做到一次编译,到处运行。也就是说Java程序可以在windows操作系统上运行,不做任何修改,同样的Java可以直接放到Linux操作系统上运行,这个被称为java程序的可移植性,或者叫做跨平台性。windows操作系统内核和Linux操作系统的内核肯定不同,他们这两个操作系统执行指令的方式也是不一样的。
结论: 显然Java程序不能直接和操作系统打交道。因为Java程序只有一份,操作系统执行原理都不同。

SUN团队让Java程序运行在一台虚拟的计算机当中,这个虚拟计算机叫做Java虚拟机,简称JVM。Java虚拟机再和底层的操作系统打交道。

Multithreading
robustness: It is related to the automatic garbage collection mechanism, which is referred to as the GC mechanism.
The garbage generated during the running of the Java language is automatically collected and does not require the programmer to care about.
Security
.....

Guess you like

Origin blog.csdn.net/qq2632246528/article/details/112176512