Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

System.out.println shortcut in intellij

In this post, we will see about System.out.println shortcut in Intellij.

You often need to print output on console using Syste.out.println to view the output. Although log4j or java.util.logger is recommended for logging any information for production code, but System.out.println is most preferred way to print anything on console quickly.

You can use intellij shortcut for System.out.println() to use it quickly and efficiently.

intellij shortcut for System.out.println

There are two eclipse shortcuts, you can use to write System.out.println.

  • You can type sout and press tab to autocomplete it.
  • You can print variable value by typing $variableName.sout and press tab
    For example: If variable name is str, then you can type str.sout and press tab to print the variable.

All intellij live templates

if you want to explore list of all live templates provided by intellij.
You can go to Settings->Live Templates

Some other important live templates related to System.out.println

Here are some other live templates related to System.out.println which you can use:

soutm : Print current class name and method to console

System.out.println("$CLASS_NAME$.$METHOD_NAME$");

soutp : Print method parameter names and values to console

System.out.println($FORMAT$);

soutv : Print a value to console

System.out.println("$EXPR_COPY$ = " + $EXPR$);

That’s all about System.out.println shortcut in intellij.



This post first appeared on How To Learn Java Programming, please read the originial post: here

Share the post

System.out.println shortcut in intellij

×

Subscribe to How To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×