title: Inputting into an array using scanner class (error: incompatible types: Scanner cannot be converted to String)
body: <p>I'm trying to input student details using a scanner but I keep getting this error:</p>
  
  <pre><code>error: incompatible types: Scanner cannot be converted to String
  </code></pre>
  
  <p>I have 4 scanners which are</p>
  
  <pre><code>static Scanner name = new Scanner(System.in);
  static Scanner Date = new Scanner(System.in);
  static Scanner address = new Scanner(System.in);
  static Scanner gender = new Scanner(System.in);
  </code></pre>
  
  <p>My code is as follows    </p>
  
  <pre><code>System.out.println("You have chosen to add a student. Please enter the following details");
  System.out.println("Name: ");
  String Name = name.nextLine();  
  System.out.println("DOB: ");
  String DOB = Date.nextLine();
  System.out.println("Address: ");
  String Address = address.nextLine();
  System.out.println("Gender: ");
  String Gender = gender.nextLine();
  
  app.addStudent(name, DOB, address, gender);
  System.out.println(Name + " has been added!" + "\n" + "Returning to menu....");
  
  app.delay();
  </code></pre>
  
  <p>The <code>addStudent</code> method is as follows</p>
  
  <pre><code>public void addStudent (String name,String DOB,String address,String gender)
  {
      for(int i = 0; i &lt; enrolment.length; i++)
      {
          if (enrolment[i] == null)
          {
              this.enrolment[size] = new Student(name, DOB, address, gender);
              this.size++;
  
              if (gender == "Male")
              { 
                  this.maleStudents++;
              }
              else { 
                  this.femaleStudents++; 
              }
              break;
          }
      }
  }
  </code></pre>