title: Different Java Scanner for input of different types
body: <p>Imagine the following scanario: 
  I have a program which ask for an integer input, followed by a String input.</p>
  
  <pre><code>int age=0;
  String name;
  Scanner sc = new Scanner(System.in);
  
  System.out.print("Enter Age: ");
  age = sc.nextInt();
  System.out.print("Enter Name: ");
  name= sc.nextLine();
  </code></pre>
  
  <p>With the aobe codes, I was not given a chance to enter the name. So normally I will declare 2 scanner objects as follows:</p>
  
  <pre><code>int age=0;
  String name;
  Scanner sc = new Scanner(System.in);
  Scanner sc2 = new Scanner(System.in);    //2nd Scanner object
  
  System.out.print("Enter Age: ");
  age = sc.nextInt();
  System.out.print("Enter Name: ");
  name= sc2.nextLine();                    //Using 2nd Scanner Object
  </code></pre>
  
  <p><strong>My question is:</strong> Is it necessary to declare multiple scanner objects to accept inputs of different types?? Am I doing the proper way as aobve?</p>
  
  <p>I have this question in mind for years already. (Several questions in SO mention multiple scanner, but their questions only used one scanner object, so I am asking this today.)</p>