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.

💻 Awesome Tech Resources:
  • Looking for ⚒️ tech jobs? Go to our job portal.
  • Looking for tech events? Go to tech events 🗓️ Calendar.️

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.
Intellij shortcut for System.out.println
  • 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.

    System.out.println variable name intellij

All intellij live templates

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

Live templates intellij]

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

soutp : Print method parameter names and values to console

soutv : Print a value to console

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

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.