Notes 1

Java branch of what?
JavaSE, JAVA Standard Edition, Fundamentals
JavaME, JAVA mobile version of the handset
JavaEE, Java enterprise applications

Java features: cross-platform, object-oriented, multi-threaded, portable.

But the use of Java where: WEB end mobile devices such as Android end, large-scale enterprise applications, desktop applet.

Shortcuts DOS
Win + r run cmd

  1. java development environment to build
    1) Download the JDK
    2) installation
    installation directory structure
    Bin: Run the tool applications
    Include: c c some header files,
    Jre: operating environment
    Lib: library .jar
    src.zip: Source file

3) to configure environment variables
to select Advanced System Settings in the right inside my computer, select the newly added two environment variables JAVA_HOME system variable in the bottom of the inside, CLASSPATH. Modified PATH
1) JAVA_HOME: jdk installation directory
2) CLASSPATH:. Compiled; the JAVA_HOME%% \ lib
. 3) the Path: may be dos;% JAVA_HOME% \ bin

2. Write the first java program, and compile and run

  1. New text document, TXT files need to show extension.

  2. Programming

  3. The document was changed HelloWorld.java

  4. Win+Rcmd

  5. Compile java program: javac HelloWorld.java
    extra .class file of the file to the java virtual machine -> jvm (JRE) look at
    cross-platform, so long as the JVM .class files can be recognized, run

  6. .Class file to run java HelloWorld
    three kinds of comments in Java
    annotations that can be recognized developer, jvm do not care
    1) single-line comments //
    2) Multi-line comments / * Description /
    3) documentation comment /
    * Description * /

Escape character, character represents a special meaning, is "\"
\ t the Tab
\ the n-newline
\ "output"
\ output \

Guess you like

Origin blog.csdn.net/weixin_44668498/article/details/90474120