Create your own shortcuts in Netbeans

Here is the tutorial of how to create your own shortcuts in Netbeans. So let’s take an example to show.
Let’s create a shortcut for an Even Odd Program:
  1. java.util.Scanner s = new java.util.Scanner(System.in);
  2. int num;
  3. System.out.println("Enter a number");
  4. um = s.nextInt();
  5. if (num % 2 == 0) {
  6. System.out.println("Even number");
  7. } else {
  8. System.out.println("Odd number");
  9. }
So, click:
Run Netbeans
"Tools" -> "Options". That will show a window like this:
Here I have used eo as an abbreviation.

Put the following code here:
  1. java.util.Scanner s = new java.util.Scanner(System.in);
  2. int num;
  3. System.out.println("Enter a number");
  4. num = s.nextInt();
  5. if (num % 2 == 0) {
  6. System.out.println("Even number");
  7. } else {
  8. System.out.println("Odd number");
  9. }
Finally, run it.