CODE IN JAVA
Create a new class named Task1. In its main function, useScanner to read integers from the keyboard with the method nextInt.Use a try catch block to capture non-integer input, and tell theuser, \"This is not an Integer\". The program loop should end whenthe user enters the string \"quit\". (Hint: \"quit\" is clearly not anumber and will be captured in the try / catch block.)
A typical Output Dialog is shown below:
Enter an Integer: 5You typed.......: 5Enter an Integer: 91You typed.......: 91Enter an Integer: 8.7>>> That is not an Integer!Enter an Integer: 34You typed.......: 34Enter an Integer: Isabelle>>> That is not an Integer!Enter an Integer: 45You typed.......: 45Enter an Integer: quit::: End Program