<<Previous Post << Complete Tutorial>> Next Post>>
In the previous article, I have explained how to use Print statements in Java.
In this article, I will explain the shortcut for typing System.out.println() statements in Eclipse IDE.
Let’s get started.
Java for Testers – Shortcut for using System.out.println() in Eclipse IDE
We may have to use System.out.println() statement in our Java programs many times and it takes a lot of time to type the entire statement in Eclipse IDE.
Instead of typing the entire statement, we can use the below shortcut in Eclipse IDE to type it very fast.
i.e. Type Syso and press Ctrl + Space keyboard keys.
Follow the below steps for practically achieving the above;
1) Let’s create a Java program and create a Demo class as shown below:
Note: If you are not aware of creating a Java project and a Class in Java, refer to our previous article – Creating a Java project in Eclipse IDE
2) Inside the main() method, let’s type Syso text as shown below:
4) After typing the Syso text as shown below, immediately press Ctrl + Space keyboard keys together.
Observe that the Entire System.out.println() statement will be auto-generated as shown below:
If in case Syso is not working, we can type Sysout and then press Ctrl + Space keyboard keys.
Here concludes this article.
In the next article, I will explain about using Comments in Java programs.
Next Steps:
- > To learn more about Java, continue to the next post (Click on Next Post link below)
- > Check complete Java Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below:
Happy Learning ?
Arun Motoori (www.QAFox.com)
On a mission to help the Testing Community in all possible ways.
<<Previous Post << Complete Tutorial>> Next Post>>