Java First Day notes

Source: Internet
Author: User
Tags clear screen naming convention

1. Be able to explain the difference between JDK and JRE

The JDK (Java Development Kit) is a Java Development Kit (Javac.exe;java.exe) that is available to developers, including the JRE (Java Runtime Environment).

The JRE (Java Runtime Environment) is a Java program running environment that contains the JVM (Java Virtual machine) and the core class library.

Summary: Developers use a program developed by the JDK to run in the JRE.


2. Ability to use common DOS commands

D:--back to the D packing catalogue;

CD.--Return to parent directory (for example, C drive);

CD "FileName"-open folder;

DIR--View the current folder;

CLS--clear screen;

Exit--quit;


3, be able to write HelloWorld source files

public class helloworld{

public static void Main (string[] args) {

System.out.println ("helloworld!");

}

}


4, can compile Helloworld.java

DOS Enter the source file (. java) folder you want to compile--dos window enter the javac.exe path. java file--enter--generate the. class file

5. Ability to run Helloworld.class files

Dos enters the folder where the. class file needs to run--dos window input java.exe path. class file--enter--window output


6. Ability to configure PATH environment variables independently

The environment variable configuration needs to be modified 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 ..." at the top.


7. Ability to use annotations in source code

Comments in Java fall into three categories:

A. Single-line comment//

B. Multiline comment/* */

C. Documentation Comments/** */


8, can explain the concept of keywords

Keywords are words that Java assigns to special meanings, all lowercase, and color-coded in specific software.


9. Ability to understand the concept and classification of constants

Constants are divided into 6 categories:

A. Integer

B. Decimals

C. Characters

D. String

E. Boolean type

F. Null value


10. Ability to retell the concept of variables

Variables are divided into two categories: base variables, reference variables

Reference variables such as arrays, interfaces, etc.

The underlying variables are divided into 4 classes and 8 small species.

A. Integral type

1) byte 1 bytes

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 bytes, the default value is False.

D. Character type: Char 2 bytes


11, can remember the definition of variable format

Two ways of defining:

A. int b;

b = 130;

b. int b = 130;

Note: The data range for each variable type, and the variable must be initialized to be used;


12. Ability to define variables and class names using identifiers

The identifier refers to a naming convention and has the following points:

A. The designation may use the letter/number/$/_;

B. Numbers and _ do not start;

C. The name of the package, the first letter of each word is lowercase;

D. The naming of the class, the first letter of each word is capitalized (the big Hump name method);

E. variable name, first letter lowercase, followed by the first letter of the word capital (small hump nomenclature);

F. Method name, first letter lowercase, followed by the first letter of the words (Small hump name method);


Java First Day notes

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.