Import Java Util Scanner - Java basic - Now to setup our scanner object we will do the following to get int input from the user we do the following.
Import Java Util Scanner - Java basic - Now to setup our scanner object we will do the following to get int input from the u…