Start the first class of java~

                                       understand java

Before knowing java? Let me talk about lz's own experience first, how to start learning java? First of all, install a jdk, which is the development environment of java.

Next, install a tool for writing java, which I will introduce to you below.

What is the least thing on the table?

First and foremost is a programming tool (also called an IDE)

Next is a tool for querying words, for example: Kingsoft PowerWord

For us to learn java, it is still very important, when naming some java identifiers

We can look it up first, so the name is better

and then next is

A tool for watching videos? Any iQiyi is fine.

Because in the next few lessons, I will send you a video, and you can download it and watch it locally.

The next thing is that for those who are new to computers, Kingsoft Typing is indispensable.

My teacher said that I will try to type blindly in the future. So typing and familiarity with ide are also essential

This also saves time in writing code yourself.

The next step is a file that can compress the compressed package, such as quick compression

The next step is to update the wps on your computer.

The next step is a tool that can view pictures and e-books. 2345 can only look at the picture king, 

The simplest Baidu, must have it,

This is very important, because for self-taught people,

Baidu or your better teacher~.

Because 80% of the questions in life have already been answered for you.

Only 20% of the problems are left to be explored by yourself. ~

Of course not, of course you can leave me a message~~~~

I am very happy to answer for you~

to the back,

I will send you some basic videos and some pdfs for everyone to see~


1.1 

The origin of the java language:

Java is a high-level programming language launched by SUN (Stanford University Network ) in 1995 . The source of the Java name       Java was originally named as Oak , and it was aimed at programming languages ​​for small systems such as household appliances. As the market changed, SUN focused on the development of network applications. The origin of the name of Java : Java is the English name of Java Island in Indonesia, which is famous for its rich coffee. Set-top box Gosling ( Gausling )    users can watch whatever they want ...

On May 23 , 1995 , the JAVA language was born .

In 1996 and 1997 , JDK1.0 and JDK1.1 were launched respectively

In 1999 , JAVA was divided into J2SE, J2EE, J2ME

In 2000 , JDK1.4 was released

At 18:00PM on September 30 , 2004 , J2SE1.5 was released, which became another milestone in the history of Java language development . In order to express the importance of this version, J2SE1.5 was renamed Java SE 5.0 

In 2005 , the JAVA version was officially renamed JAVAEE, JAVASE, JAVAME

In December 2006 , SUN released JRE6.0 

On April 20 , 2009 , Oracle acquired Sun for US $ 7.4 billion . Obtain the copyright of java .

In September 2010 , JDK7.0 was released, which added simple closure function. In July 2011 , Oracle released the official version of java7 .

One after another, java has already had a version of java10.0, and the future of java is still very bright. . Come on everyone~~~


Yes, java is very popular, why? It is because of some of its features that other programming languages ​​do not have~


1 cross-platform

What is cross-platform (computer system) , the concept of cross-platform is an important concept in software development, that is, it does not depend on the operating system or the hardware environment. An application developed under one operating system can still run under another operating system.

"write once run anywhere" (this is also called "write once, run anywhere")

Java's cross-platform is relative to other programming languages. Applications written in the Java language can run on different system platforms. If a general high-level language is to be run on different platforms, at least it needs to be compiled into different object codes. The c language program compiled in windows cannot run under linux. Of course, the c language program compiled under linux cannot run under windows. The Java language does not need to be recompiled when running on different platforms.

The principle of Java cross-platform: Java's cross-platform is realized through the Java Virtual Machine (JVM).


In fact, java is not really fully cross-platform, it can only run on mainstream operating systems, because not all systems have java virtual machines for corresponding platforms~

JVM

Java Virtual Machine A software emulation of a computer. The Java source program is imagined as our C source program, and the bytecode (.class) generated after the Java source program is compiled is equivalent to the binary executable file after the C source program is compiled. The JVM virtual machine is equivalent to a computer system (operating system + hardware environment), and the Java interpreter is equivalent to a CPU.

The .exe file runs directly under the windows operating system, and the machine code (.exe file) runs on the CPU

The .class bytecode file runs under the JVM virtual machine, and the Java bytecode runs on the Java interpreter.

The Java interpreter is equivalent to the "CPU" that runs Java bytecode, but the "CPU" is not implemented by hardware, but by software. The Java interpreter is actually an . As long as the interpreter program under a specific platform is implemented, the Java bytecode can run under the platform through the interpreter program, which is the foundation of Java cross-platform. Currently, not all platforms have corresponding Java interpreter programs, which is why Java cannot run on all platforms. It can only run on platforms that have implemented Java interpreter programs.


To put it bluntly, the computer can't understand java words, so first convert the java words into binary bytecodes that can be understood by the computer, that is, the corresponding .class file

And jvm is doing this job


The three major platforms of JAVA:

JavaSE (it is the standard version for learning java, which contains the basic grammar of java, various common sense of java, it is recommended to learn from here)

 Java SE ( Java Platform , Standard Edition ) . Java SE was formerly known as J2SE . It allows the development and deployment of Java applications for use in desktop , server , embedded and real-time environments . Java SE includes classes that support the development of Java Web services and provides the foundation for Java Platform , Enterprise Edition ( Java EE ).  

Example: Desktop applications like QQ , Minesweeper, Feiqiu, and Lingbo.

Java EE (the enterprise version of java, now the mainstream, can do large-scale applications and projects, you can start the journey after learning javase javaee~)

 Java EE ( Java Platform , Enterprise Edition ) . This version was formerly known as J2EE . The Enterprise Edition helps develop and deploy portable, robust, scalable and secure server-side Java applications. Java EE is built on the basis of Java SE , which provides Web services, component models , management and communication APIs , and can be used to implement enterprise-level service-oriented architecture ( service-oriented architecture , SOA ) and Web 2.0 applications. 

Java ME (According to our teacher, there are still many companies that are no longer feasible and are about to die. In the past, there are more games used on button phones. Few companies use this thing anymore, because there are already more Good Android system to replace him, and the picture is better than them~)

 Java ME ( Java Platform , Micro Edition ) . This version was previously called J2ME , also called K-JAVA . Java ME provides a robust and flexible environment for applications running on mobile and embedded devices such as cell phones, PDAs , TV set-top boxes , and printers. Java ME includes a flexible user interface, a robust security model, many built-in network protocols, and rich support for networked and offline applications that can be dynamically downloaded. Applications based on the Java ME specification can be written once for many devices and can take advantage of the native capabilities of each device.


Introduction to JDK :

JDK ( Java Development Kit ) is Sun Microsystems ' product for Java developers. Since the introduction of Java , JDK has become the most widely used Java SDK . JDK is the core of the entire Java , including the Java runtime environment, Java tools, and Java basic class libraries. JDK is the first step to learn Java well . Starting from SUN 's JDK5.0 , it provides very useful functions such as generics, and its version is constantly updated, and its operating efficiency has been greatly improved.

JDK installation

1) Just go to Baidu directly

2) Go to the official website to download~


JDK directory introduction

1. bin directory: stores Java compiler, interpreter and other tools (executable files).

2. db directory: a lightweight database attached to JDK7, named Derby.

3. include directory: interface files for calling system resources are stored.

4. jre directory: Stores Java runtime environment files.

5. lib directory: store Java class library files.

6. src.zip file: the source code of the classes provided by JDK.

Things to pay attention to when installing JDK:

1. Do not include Chinese in the installation path . (This is really important, considering the reason that java is cross-platform~, it may be garbled on other operating systems~)

2. Do not include spaces in the installation path. (This is indeed important, but don't worry about it for now, first install jdk first, then choose the default path first, even though there are spaces in the default path~)

Introduction to JRE

JRE Java Runtime Environment Java runtime environment. Including the Java Virtual Machine (JVM Java Virtual Machine) and the core class library required by the Java program. If you want to run a developed Java program, you only need to install the JRE in the computer.



The characteristics of the java language can be summarized as follows:

Simplicity Interpretation
Object-oriented High-performance
distributed processing Multi-threading
robustness Dynamic
structure neutral security
Open source (open source code) Free
cross-platform (write once, run everywhere)


To put it simply: the java program developed using the JDK is handed over to the JRE to run.
JDK>JRE>JVM
















                          

Guess you like

Origin blog.csdn.net/qq_40077806/article/details/80011137