Is there a shortcut for wrapping a statement with system.out.println in IntelliJ

In Intellij Idea 13.1, there is a shortcut way called “postfix code completion”.

So, to wrap an expression, object or variable with System.out.println, you simply write its name, put a dot then write sout, then hit 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 completions on this page:
http://blog.jetbrains.com/idea/2014/03/postfix-completion/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)