Pages

Footer Pages

Spring Boot

Java String API

Java Conversions

Kotlin Programs

Kotlin Conversions

Java Threads Tutorial

Java 8 Tutorial

Thursday, November 18, 2021

Eclipse System.out.println Shortcut for windows and mac os versions

1. Overview

In this tutorial, we'll learn how to launch and shortcut for system.out.println in eclipse for java development.

Usage of System.out.println() is very useful to debug the program easily when you are doing the application development or learning phase.

But it is recommended to use Log4j or slf4j api for logging the relevant info in production environments.

All shortcuts showin in this article will work for windows and mac os x operating systems eclipse versions.
Eclipse System.out.println Shortcut for windows and mac os versions


2. System.out.println shortcut in eclipse using syso or sys


To auto populate the system.out.println, you just need to type the syso then press control + enter keyboard shortcut key combination to show the complete option.

Look at the below screenshot for better understanding and follow the step along with.

If you are using the latest eclipse editors then just type only "sys" and then presss ctrl + enter key.

Then it will show the few more options for error and out message as below.

 
System.out.println shortcut in eclipse

Once you select sysout from the auto complete options then it will fill the full system.out.println statement as below.

Eclipse System.out.println Shortcut 2


3. System.out.println shortcut in eclipse using sysout 


If you do not want to see the options for error and out like above then just type complete word "sysout" then press control + enter. 

This shortcut will add directly full system.out,println without any delay.

sysout shortcut for System.out.println();



4. System.out.println shortcut in eclipse using sout


The latest eclipse versions are added with the new shortcut key "sout" then press control + enter.

sout also direclty generates system.out.println.


sout shortcut for System.out.println();


5. System.out.println shortcut from templates


If any one of the above shortcuts are not working for you, it is better to check the right key mapped for this system.out.println statement in eclipse templates.

Template locations:


Windows eclise version: window --> preferences --> java --> Editor --> templates
Mac os x eclise version: Eclipse --> preferences --> java --> Editor --> templates

Look at the below template settings.

sysout shortcut for System.out.println() from templates


6. Conclusion


In tihs article, we've seen the different ways to open the short cut for system.out.println in eclipse for mac and windows versions.


No comments:

Post a Comment

Please do not add any spam links in the comments section.