tags (space delimited): Java BasicsOne: Computer Overview
Computers: Hardware and software
Hardware: Controller operator memory input and output devices
Memory : External memory (hard disk) memory
Software: System software application software
system software: Windows Linux DOS IOS Android Unix MacOS
Bare Metal: No operating system installed
application software: QQ Office MD web App
Second: Software development and computer language
-
What is software? A collection of data and instructions in a specific organization order
-
Computational language classification: Machine language (binary 0 and 1) assembly language (special symbol) high-level languages (JAVA C C + + C # ...)
Three: human-computer Interaction
In two ways: a command line two graphical interface
New ways to interact with languages: Siri Chinese voice
Four: Keyboard function keys and shortcut keys
Tab: Tab shift up conversion key CTRL control key ALT Change
Shortcut keys: Ctrl + C Copy Ctrl + V Paste Ctrl + Z Undo Ctrl + X cut
CTRL + A Select all CTLR + S Save
Key combinations: Windows +e open My Computer windows + R Open run
Input: OSK This command
V: How to open the DOS console
Fastest: Windows + R input cmd command
Seven: Java language overview
The father of Java: James Gosling high Commander Gosling
Java version 1.5 Tiger 1.6 Mustang 1.7 Dolphin
Eight: Cross-platform principle
Programs written in the Java language can be cross-platform, through a virtual machine (JVM)
* * Virtual machines cannot cross platform!**
Depending on the operating system, downloading and installing different virtual machines is possible.
Nine: JRE and JDK
* Jdk:java development tool +JRE: suitable for Developers
* No need to install the JRE after installing the JDK
10: Download of JDK
Download path [click to download] (http://www.oracle.com) This path
JDK default installation: C:\Program Files\java
11: JDK Directory explanation
12: Development Tools
Notepad Notepad editplus editor Eclipse MyEclipse
13: HelloWorld Case writing ( very important )
HelloWorld {
Main (args) {
System. Out. println ("Hello world!");
}
}
14: Common Mistakes
15: Writing Format
-
Left curly braces to write in pairs
-
Space before opening curly brace
-
The opening curly brace to indent
Configuring the PATH environment variable ( important )
is to run Javac and Java commands in any directory
* How do I configure the PATH environment variable?
First configuration scenario: My Computer-Properties-advanced-environment variable---system variable--path---Edit----at the front (note: do not delete!)--Copy the Bin directory path to the; semicolon before---OK--OK
The second configuration scenario: My Computer-Properties-advanced-environment variables---system variables--path---The installation directory of the JDK for the new java_home---input, including the bin---in Path, through%java_home%\bin;
Think about it? Is it only the JDK that needs to configure the PATH environment variable?
classpath environment variable configuration
No configuration is required, JDK1.5 is performed by default on the current path.
Path and Classpath differences:
path: The executable file is configured
ClassPath: The Java class file is configured
configuration of the EditPlusNotes
Category: Single-line comment Multiline comment document comments
Single line://Comment text
Multiple lines:/* Comment Text */
Document Comment:/** the text of the comment */
Note: Single-line comments can be nested multiple lines of comments can not be nested
Multiline comments can be nested in a single-line comment,
keywords ( very important )
What is a keyword? A word that is given special meaning by Java is actually an English word.
There is a special meaning.
identifiers ( very important )
Composition: English alphanumeric _ and $ Chinese (not recommended)
Precautions:
* Numbers do not start
* Cannot use keywords
* Strictly case-sensitive
Example:
identifier naming rules ( proficiency )
Package Name:
All lowercase
Naming of classes and interfaces
Capitalize the first letter of a single word, and capitalize the first letter of each word in multiple words
Example: HelloWorld Login Load
Variables and methods
single word all lowercase, multiple words, second word, first letter capitalized
Java Basics no1--Configuration and naming rules for environment variables