Regain the basics of java (1): Summary of java overview
1. Shortcut keys
Windows + r 系统运行(cmd) Windows+E 资源管理器 Ctrl + A 全选 Ctrl + C 复制 Ctrl + V 粘贴 Ctrl + X 剪切 Ctrl + S 保存 Ctrl + Z 撤销
2. Characteristics of Java
Object-oriented Open source Cross-platform: realized through JVM of different operating systems
3. JVM, JRE, JDK relationship
JVM java virtual machine
JRE java operating environment includes JVM
JDK java development package development environment includes JDK
4, HelloWorld case
class Demo{ public static void main(String[] args){ System.out.print("Hello World"); } }
5, Java operating principle
1. Write source code
2. Compile it into a class file through javac
3. Run the compiled class file through java
6. Configuration of path environment variables
A. Computer-Properties-Advanced System Settings-Advanced-Environment Variables-System Variables-path-";C:\Developjava\JavaJDK\jdk1.7.0_75"
B. Computer-Properties-Advanced System Settings-Advanced-Environment Variables-System Variables-Add "JAVA_HOME" "C:\Developjava\JavaJDK\jdk1.7.0_75"-path-";%JAVA-HOME%\bin"
7 , escape character
\t tab键 控制键 \n 转行
8, comment
平行注释 // 段落注释 /* .......*/
9, keyword
int class float 等高级软件蓝色字体 goto
10, identifier
is what we give to classes, interfaces, attributes , objects, constants, etc.
Composition rules:
1. Composed of English uppercase and lowercase letters.
2. Numbers (numbers cannot be used as the beginning)
3.$ and _
Naming rules:
1. Keywords are not allowed
2. Chinese cannot be used.
Naming convention:
1. See the name and know the meaning
2. Package: all composed of lowercase letters
Class/interface: the first letter is capitalized, if there are multiple words, the first letter of each word Letters are capitalized.
Attributes, variables, objects: the first letter is lowercase. If there are multiple words, the first letters of other words except the first letter are capitalized.
Constants: all composed of uppercase letters, multiple words separated by _.
The above is the content of Regaining the Basics of Java (1): Java Overview and Summary. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!