[Practical Tutorial] Teach you the tricky operation skills in IDE!

I rely on, this is a master! What a master!

IDEA has a very powerful function, that is, suffix completion (not automatic completion). Many people do not know this operation and are still manually typing the code.

This function can use code completion to complete statements in a template style, such as traversing loop statements (for, foreach), using String.format() to wrap a string, using type conversion to wrap an expression, and judging (not) empty Or other discrimination statements generate if statements, use instanceOf to generate branch judgment statements, etc.

The way to use it is also very simple, that is, press the period . after an expression, and then enter some hints or select a candidate in the list. A GIF demonstration will be given below the common candidates.

1. var declaration

2. null

3. notnull is not null

4. nn is not empty

5. for traversal

6. fori traversal with index

7. not Negate

8. If conditional judgment

9. cast

10. return return value

How about reading it? Hurry up and use it~

Guess you like

Origin blog.csdn.net/qq_16027093/article/details/131503814