Code code

1. Function of abbreviation

  • Method: Generally take the first letter

  • Example:

Public static void main(String[] args){

System.out.printf("");
souf

2. Creating a new function

  • Method: Select the target function and press Alt + Enter

  • Example:

Function to add:

private static void newfun(int i, String aa) {}Copy the code

3. Surround, such as if, catch

  • Method: Select the object code snippet, CTRL + Alt + T and select surround

  • Example:

Code to add:

Thread.sleep(300);
Copy the code

Select CTRL + Alt + T:

try {
    Thread.sleep(300);
} catch (Exception e) {
    e.printStackTrace();
}
Copy the code