Get an input from user scanner class
<p>normally when I get a user interaction from a keyboard I use class scanner to do so but the problem I noticed when using its methods is that it's not handling exception!  For example</p>

<pre><code>Scanner input = new scanner();
Int number = input.nextInt();
</code></pre>

<p>The above works good for all integer numbers but if the user mistakly entered a character or a string, it will throw an exception and stops executing the rest of the program.</p>

<p>My question is there any way to avoid this?</p>

<p>Thank you in advance.</p>
