1. The history of computer language
First generation language: Machine language 01 string composition, the machine can be directly identified, the development is difficult but the implementation of high efficiency.
Second-generation languages: assembly language introduced a number of instructions, relative to the machine language is easier to write, the dependence on the hardware is high, poor portability.
Third-generation languages: high-level languages are closer to human natural languages and easier to write.
Process-oriented language: C language ....
Object-oriented language: Java language, C # language ....
The history of 2.Java SUN--->oracle
The father of Java: James Gaussian Forest
The 1995 Java language was unveiled.
Released in 1998, JDK1.2 Java is divided into J2SE, EE, and J2ME
2002 released JDK1.4.
Released in 2004, JDK1.5 introduced a number of new features: generics, annotation, and more.
In December 2006, Sun released the JDK1.6.
In July 2011, Oracle released the JAVA7.
In March 2014, Oracle released the JAVA8.
Features of the 3.Java
A. Cross-platform: JVM
B. Security
C. Simple
D. Fully object-oriented
E. Robust
Why 4.Java can cross-platform:
Depending on the JVM, the Java program is compiled into a platform-independent bytecode file that is then interpreted by the interpreter on the JVM.
5.JVM,JRE,JDK relationship?
Jvm:java virtual Machines
Jre:java the runtime environment, which contains the JVM and Java class libraries.
The Jdk:java Development Kit contains the JRE and tools for compiling, executing, or tracing.
6. How to configure environment variables for Java
A. Configuring Java_home
B. Configuration classpath,jdk5.0 above can be omitted.
C. Configure path
D. Test environment variables
Start-----> Run---->cmd
7. Development steps for writing the first Java program
A. Writing the Java source program (suffix. java)
public class class Name {
public static void Main (string[] args) {
System.out.println ();//line-Break output
System.out.print ();//non-newline output
}
}
Note: A source file can contain more than one class, but can only contain a public class that is decorated with public, and the file name should match the common class name.
eg
public class hello{
public static void Main (string[] args) {
System.out.println ("hello,zhangsan!");
}
}
Class hello2{
public static void Main (string[] args) {
System.out.println ("hello,zzsxt!");
}
}
B. Compiling a Java source file into a bytecode file (suffix. Class)
Javac source File
Eg:javac Hello.java
C. Run a bytecode file
Java class name
Eg:java Hello
8. Escape character
\ t: Tab stop, equivalent to a number of spaces
\ n: Line break
9. Comments (pseudo-code)---> Programmers
Comments are not interpreted, there are three of comments in Java
Single-line Comment://comment Content
Multiline Comment:/* Comment content */
Document Comments:/** comments */
Ten.DOS commands
Open Notepad: Start---> Run (win+r)--->notepad
Open artboards: Start---> Run (win+r)--->mspaint
Open Calculator: Start---> Run (win+r)--->calc
Start---> Run (win+r)--->cmd (Open DOS command line window)
Change Drive letter: drive letter
EG:D:
Dir: Show current directory
CD: Change or display the current directory
CD: Exit the first-level directory
CD \: Exit to the same drive letter
MD: Creating a Directory
RD: Delete directory (destination must be empty)
Cls (Clear screen): Clear Command Prompt window
Ver: Displays the version number of Windows
Exit: Exit
Network Operations Command
PING: Test Connection
IPCONFIG: Network Status View
First knowledge of Java