Home > Back-end >  Hello World
Hello World

Time:12-01

# the HelloWorld



# # learning

? Class time immediately practice just speak in the class code



# # common DOS command

In the DOS window: * * * *

? Windows + r & gt; CMD search CMD

Settings: * * * *

? Quick edit mode: window - & gt; Right click - & gt; Property - & gt; Convenient quick edit mode (copy and paste)

Common command: * * * *

1. Dir lists the current directory path all the content of the

2. Switch drive: drive name: (case-insensitive)

3. The CD under the path to a path

- and the more simple the relative path:
- an absolute path: where you can use the
- note: switching path across the drive, the manual switch drive

4. CD \ back to current plate FuGen directory

5. CLS please screen

6. Continue to push the switch TAB auto-completion,

7. The direction key, used to find the command

8. Shut down the exit

9. The mkdir folder name - & gt; Create the folder

The rmdir folder name



# # JDK version:

Jdk1.2

Jdk1.5

Jdk1.7

Jdk1.8

Thinking after class: they know jdk1.5, 1.7, 1.8 version of the new features (3)



# # Java code execution process:

Write the source code. Java - & gt; Through the javac compiler. The class bytecode file - & gt; Java explain run



The characteristics of the # # Java language

Simple and efficient, object-oriented, platform neutrality,

Compile once, run anywhere

Cross-platform: no virtual machine, cannot enlarge platform, Java code to run on the virtual machine

Note: is a Java class file cross-platform not source files



# # JDK installation and test

# # # installation reference document

# # # test:

? 1. Perform the Java command CMD arbitrary path

? 2. Java - check out the Java version installed version



# # your first Java program

Premise: JDK installed successfully

1. Create a new file HelloWorld. Java

2. Write a Java program - & gt; Template

3. Use ` javac ` commands to compile the source file, compiled into one. The bytecode file at the end of the class for the

? Javac HelloWorld. Java

4. Use ` Java ` command to explain bytecode file execution

? Java HelloWorld

Note: if you modify the source code, the need to recompile the bytecode file



# # configure the environment variables:

Objective: * * * * any path of Java

CodePudding user response:

Consider the