Doscommand-Environment Variable-data type-naming convention, dos environment variable

Source: Internet
Author: User
Tags zip folder

Doscommand-Environment Variable-data type-naming convention, dos environment variable

JAVA Day 1 note -- doscommand-Environment Variable-data type-naming convention
1. Differences between JDK and JRE
JDK (Java Development kittings is the Java Development Kit (javac.exe+java.exe) used by developers, including JRE (Java Runtime Environment ).
JRE (Java Runtime Environment) is a Java program running Environment, including JVM (Java Virtual Machine) and core class library.
Summary: developers use JDK-developed programs to run in JRE.

2. Common doscommands
D: -- return to the root directory of drive d;
Cd .. -- return the parent directory (take disk C as an example );
Cd "file name" -- open a folder;
Dir -- view the current folder;
Cls -- clear screen;
Exit -- exit;

3. Ability to compile the HelloWorld source file
Public class HelloWorld {
Public static void main (String [] args ){
System. out. println ("HelloWorld! ");
}
}

4. Compile HelloWorld. java
Dosenter the source file to be compiled (.java.zip folder --dos Window input javac.exe path. java file -- enter -- generate a. class File

5. The HelloWorld. class file can be run.
The. classfile folder for running the dosjob. enter the java.exe path. class file -- enter -- window output.

6. Independent configuration of path Environment Variables
You need to modify the environment variable configuration in two places:
A. System -- Advanced System settings -- environment variables -- System variables -- New -- name (JAVA_HOME), variable value (D: \ JAVA );
B. System -- Advanced System settings -- environment variables -- System variables -- find "PATH" -- add "% JAVA_HOME % \ bin ;...... "

7. Use comments in source code
Java annotations are classified into three types:
A. Single line comment //
B. Multi-line comment /**/
C. document comments /***/

8. concepts that can explain keywords
Keywords are words with special meanings granted by JAVA. They are characterized in lowercase and are marked by colors in specific software.

9. Be able to understand the concept and classification of constants
Constants are classified into six types:
A. Integer
B. Decimal
C. Character
D. String
E. Boolean
F. Null Value

10. Ability to repeat the concept of Variables
There are two types of variables: basic variables, reference Variables
Reference variables such as arrays and interfaces
Basic variables are divided into four categories and eight small types
A. Integer
1) byte 1 byte
2) short 2 bytes
3) int (default) 4 bytes
4) long 8 bytes
B. Floating Point Type
1) float 4 bytes
2) double (default) 8 bytes
C. boolean: boolean -- true/false: 1 byte. The default value is false.
D. Character Type: char 2 bytes


11. Remember the Definition Format of Variables
Two definition methods:
A. int B;
B = 130;
B. int B = 130;
Note: The data range of each variable type; the variable must be initialized before use;

12. Variables and class names can be defined using identifiers
Identifiers refer to naming conventions, including the following:
A. the name can contain letters/numbers/$ /_;
B. Numbers and _ cannot begin;
C. Package name. the first letter of each word is lowercase;
D. Class naming. the first letter of each word is in upper case (big camper );
E. Name the variable. The first letter of the first word is lowercase, And the last letter of each word is uppercase );
F. Method naming: the first letter of a word is in lowercase, And the last letter of each word is in uppercase (small camper method );

13. Decompilation
Javap <option> compiled class file (all file names can be added without. class)
-C: decomposition method code, showing the specific bytecode of each method
-L: Specifies the display of the row number and local variable list
-Verbose: displays details.
-Public | protected | default | private: displays Class Members of this level.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.