To build our project use maven.
mvn clean compile
To run our project use maven exec plugin.
mvn exec:java
Then insert desired values and you will see the ouput soon.