Phase I notes Java Basics_ day01

Time:2021-7-29
Confucius said: learning and learning from time to time.

day 01 JDK

1、 Fundamentals of computer

1. Computer

Computer is a modern intelligent electronic device that can run according to program and process data automatically and at high speed. A computer composed of hardware and software without any software is called bare metal.

2. Computer hardware

It refers to the general name of various physical devices composed of electronic, mechanical and photoelectric components in computer system.

3. Computer software

Make the computer complete specific functions in a predetermined order, and the computer software is divided into system software and application software according to its functions.

System software: DOS (disk operating system), windows,, Linux, UNIX, MAC, Android, IOS

Application software: Office

4. Computer interaction mode – command line

#Open DOS window
win+r cmd
#Switch to disk f
F:
#Lists all resources in the current directory
dir
#New folder
mkdir test
#Delete folder
rmdir test
#Return to the previous level
cd ..
#Return to the root directory
cd /
#Clear screen
cls
2、 Java Language Overview

1. Platform version

J2SE Standard Edition is a solution for developing ordinary desktop and business applications. This technical system is the basis of the other two and can complete the development of some desktop applications.

J2ME mini version is a solution for developing mobile devices and embedded devices (appliances / robots / set-top boxes…).

J2EE Enterprise Edition is a set of solutions for developing applications in enterprise environment. The technologies contained in the technical system, such as servlet and JSP, are mainly aimed at web application development

2. Language features

Simplicity, high performance, compilability, interpretability, object-oriented, distributed processing, robustness, security, open source, cross platform

I. what is cross platform?

Applications written in Java language can run on different system platforms. Write once and run everywhere.

II. What is the principle?

Just install a Java virtual machine (JVM) on the operating system that needs to run Java applications. The JVM is responsible for the running of Java programs in the system. Because of the JVM, the same Java program can be executed in three different operating systems, which realizes the cross platform of Java program, also known as Java, and has good portability.

3、 JDK

JDK is a software development kit of Java language, which is mainly used for Java applications on mobile devices and embedded devices. JDK is the core of the whole java development.

It includes: 1) Java development tool (JDK \ bin); 2) Basic development library (JDK \ JRE \ lib \ rt.jar); 3) Source code of basic development library (JDK \ Src. Zip)

1. Download and install

2. Inspect JDK

java -version
4、 Java development

1. Use tool development

Eclipse (free), idea (free and charged), MyEclipse (charged)

2. Download, install and configure eclipse

#Set workspace
File -> Switch Workspace -> Other

3. Create helloworld.java

#Create project
Right click - > New - > Project - > java project - > next - > enter project name - > finish
#Create package
Right click - > New - > package - > Enter package name (CN. Tedu. Hello) - > finish
#Create class
Right click - > New - > class - > enter class name - > check auto generate main method - > finish
#Automatic replenishment
syso alt+/
#Run program
ctrl+F11
package cn.tedu.hello;
public class Helloworld{
    public static void main(String[] args) {
        //TODO Auto-generated method stub
           System.out.println(666);
    }
}