Advanced java-based review (easy to overlook or forget the details)

Most of the contents of the article links to other blog posts, predecessors of the equipment has been described, I'm not here to say, according to their own situation, their own to search (written by personal circumstances, as well as error-prone easy to forget can also share the next lower understand )

 

1. Standard Input Scanner (text scanner) class

A simple example

import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        String i = sc.next ();
        System.out.println (i);
    }
}

 

nextLine () to end the carriage return (you can call twice to eliminate the last press enter), NEX () with a space, enter the end

2.Math type  of floor, round and ceil method

 

floor rounding down   

rounding up ceil   

4 is round rounded 5 is calculated into the, round method, which represents a "rounding"

3. The built-in data types of packaging

 

Appreciated boxing and unboxing, and direct output class object calls toString method (inherited from Object Class)

Learn some ways to use wrapper classes contained https://www.cnblogs.com/lilinfeng/p/10981739.html ( packaging method summary )

4. The escape sequence

Preceded by a backslash ( \) character represents the escape character, it is the compiler has a special meaning.

The following list shows the Java escape sequences:

Escape Sequences

description

\t

In the text where the tab is inserted into a

\b

In the text where the key is inserted into a retracted

\n

Where in the text wrap

\r

Where the carriage returns in the text

\f

In the text where the insert page breaks

\'

Inserted in the text where the single quote

\"

Inserted in the text where the double quotes

\\

Inserted in the text where the backslash

5.java annotation ( Annotation)

Understand the meaning of annotations

https://www.runoob.com/w3cnote/java-annotation.html ( the Java annotation Detailed)

@test unit test is more commonly used features

So that the code does not need main methods can be run directly

6.String,StringBuffer,StringBuilder

https://blog.csdn.net/u014726937/article/details/52079732 (between the three types)

7Java object references and object assignment

https://www.cnblogs.com/liuurick/p/10713656.html (if vague in this regard can see)


8.System.out.println () meaning

https://blog.csdn.net/writebook2016/article/details/80695327

9. == and equals the difference between the contact

https://blog.csdn.net/qq_27471405/article/details/81010094

10.Java in length and length ()

https://blog.csdn.net/moakun/article/details/80231105

11.Java date and time

https://www.runoob.com/java/java-date-time.html

12.Java flow (Stream), file (File) and IO

https://www.runoob.com/java/java-files-io.html

13.java Generics

14.Java thread

15.JVM related

java operating principle and Memory Management

 

 

 

 

 

 

 

Class loading mechanism and the class loader (ClassLoader)

https://blog.csdn.net/m0_38075425/article/details/81627349

Guess you like

Origin www.cnblogs.com/xiaoyezideboke/p/11461540.html