What is Difference between using the Scanner class in Java for input and using Strings Args[] with parseint?
<p>What is the difference between the following</p>

<pre><code>import java.util.Scanner;
//Creating the scanner
Scanner input=new Scanner(System.in);
System.out.println("Enter the number 1");
int number1=input.nextInt();
</code></pre>

<p>vs</p>

<pre><code>int number1=parseInt(args[0]);
</code></pre>
