Take the Java language as an example:
1. Learn about the process steps from writing Java programs to running.
1) TXT Notepad
2) Download JDK
3) familiar with the DOS window under some simple commands
4) Configuration of environment variables
So what is the JDK? The JDK (Java Development Kit) is the Java Language Software Development Kit (SDK). The JDK is available to Java developers, which includes Java development tools and the JRE. So with the JDK installed, you don't have to install the JRE separately. Development tools: Compilation Tools (Javac.exe) packaging Tools (Jar.exe), etc.
The basic components of the JDK include: javac– compiler, the source program to the bytecode jar– packaging tool, the relevant class files packaged into a file javadoc– document generator, extract the document from the source notes Jdb–debugger, error-checking tool java– shipped Line compiled Java program (. class suffix) Appletviewer: Applet browser, a Java browser that executes Java applets on HTML files. Javah: Generates a C procedure that can invoke a Java procedure, or a header file that can be called by a Java program. The Javap:java disassembler, which displays the accessible functionality and data in the compiled class file, shows the meaning of the byte code. Jconsole:java Tools for system commissioning and monitoring
JRE (Java Runtime Environment Java Run environment)
including Java virtual machines (JVM Java) and the core class libraries required by Java programs, if you want to run a well-developed Java program, you only need to install the JRE on your computer.
Java.lang: This is the underlying class of the system, such as String, which is the only package that can be used without introducing (import). Java.io: This is all the input and output related classes, such as file operations. Java.nio: In order to improve the function in IO package, a new package written to improve the performance of IO package, such as NIO non-clogging application java.net: This is a network-related class, such as Url,urlconnection. Java.util: This is the system auxiliary class, especially the collection class Collection,list,map and so on. java.sql: This is the database operation class, Connection, Statement,resultset and so on. Javax.servlet: This is the class used by Jsp,servlet and so on.figure for JDK, interpreting and executing as JRE
The development cycle for Java applications includes compiling, downloading, interpreting, and executing several parts.
Compile: The Java compiler translates the Java source program into the JVM executable code-bytecode. Javac.exe
Explain the execution of the process in three parts: code loading, code validation, and code execution. Java.exe
(Java) Code loading: The work of loading code is done by the class loader. The class loader is responsible for loading all the code required to run a program, which also includes classes inherited by classes in program code and classes that are called by them.
Code checksum: The code that is loaded is then checked by the bytecode validator. The validator can find many errors such as overflow of operand stack, illegal data type conversion and so on.
Code execution: After validation, the code begins to execute. There are two ways to execute Java bytecode: 1. Instant compile: The interpreter compiles the bytecode into a machine code before executing the machine code. 2. Explanation of execution: The interpreter completes all operations of the Java bytecode program by interpreting and executing a small piece of code each time. The second method is usually used. Because the JVM specification is sufficiently flexible, this makes it highly efficient to translate bytecode into machine code. For applications with high operating speeds, the interpreter can instantly compile Java bytecode into machine code, which guarantees the portability and high performance of Java code.
Why Configure environment variables? In order to facilitate the compilation of the program run. If the environment variable is not configured, we compile the file under DOS window as follows: C:\users\administrator>f:\develop\java\jdk1.7.0_75\bin\javac J:\JavaBase\day1\ Test.java If you configure environment variables: just C:\users\administrator>javac J:\JavaBase\day1\test.java2. Understand the Java language itself.
1) Keywords-words that are given a specific meaning by the Java language
2) identifier--is a sequence of characters used to name a class, interface, method, variable, etc.
3) Notes--text to explain the program
4) constant--its value cannot be changed during program execution
5) Variable--the amount of the value that can change within a range during the execution of a program
6) data type and type conversion--basic data type (numeric, character, Boolean) reference data type (class, interface, array)
7) Operator--
8) Statement--Sequential statement (program from top to bottom read and write), select statement (If,switch, ternary operator), Loop statement (For,while,do....while), jump statement (Break,continue,return)
9) method (function)-- method is a block of code that accomplishes a particular function, focusing on: Method overloading
9) Array--an array is a collection of multiple elements that store the same data type.
The learning process of programming language