Java – there is a system in IntelliJ out. Shortcut to println package statement
•
Java
In my opinion, sometimes I want to print the value of a variable, so I repeat the following operations:
>Write South tab (shortcut to system. Out. Println) > write variable name in function
Can IntelliJ use keyboard shortcuts to wrap function variables?
Solution
In IntelliJ idea 13.1, there is a shortcut called "suffix code completion"
So, use system out. Println wraps an expression, object or variable. You just need to write a name, put a dot, write south, and then click tab So, for example:
new MyObject().sout + <tab>
Will be converted to
System.out.println(new MyObject())
More examples
"Hello World!".sout int myVariable = 5; myVariable.sout
You can get more information about postfix completion on this page: http://blog.jetbrains.com/idea/2014/03/postfix-completion/
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码