title: "Incompatible types: String cannot be converted to Person"?
body: <p>For class I have to create a Java class definition to describe a car loan taken by two people. It has to contain:</p>
  
  <ol>
  <li>bankName (a string)</li>
  <li>accountNumber (an integer)</li>
  <li>signer (a <strong><em>Person</em></strong>)</li>
  <li>coSigner (a <strong><em>Person</em></strong>)</li>
  </ol>
  
  <p>It also has to have a getInfo() method which concatenates bankName and accountNumber.</p>
  
  <p>Below is my what I have for the car loan class in which I'm trying to create, but I also have to create another class file called Person. </p>
  
  <p><strong>CarLoan.java:</strong></p>
  
  <pre><code>  package carloandemo.csc212hw01;
  
    public class CarLoan {
  
      public static void main(String[] args) {
          String bankName;
          bankName = "Chase";
          int accountNumber;
          accountNumber = 123456;
          Person signer;
          signer = "Rich";
          Person coSigner;
          coSigner = "Tim";
          String print = getInfo(bankName, accountNumber, signer, coSigner);
          System.out.println(print);
          //  System.out.println(getInfo() );
      }
  
      public static String getInfo(String bankName, int accountNumber, String signer, String coSigner) {
          return "The bank is " + bankName + " and the account number is " + accountNumber + ". " + "The signer of the loan is " + signer + " and the co-signer is " + coSigner + ".";
  
      }
  
    }
  </code></pre>
  
  <p><strong>Person.java:</strong></p>
  
  <pre><code>package carloandemo.csc212hw01;
  
  public class Person {
  
     public String signer;
     public String coSigner;
  
  }
  </code></pre>
  
  <p>For the code where I assign the Person variables signer and coSigner values, I am recieving an error that says "Incompatible types: String cannot be converted to Person". Because of this I am also receiving that error on the String print statement. How can I fix this? What am I doing wrong?</p>