title: Comparing two class objects with a method
body: <p>I have a multitude of objects that are created with multiple instance variables (a string a multiple integers)
  I have to create a method that will check for equality between the object that executes the method and another object. By that I mean that I would want to see whether all the instance variables are the same for two objects by calling a method. I'm thinking of something like the equals method (string1.equals(string2)), but can I do the same for an object with multiple instance variables which are not all strings?</p>
  
  <p>example:</p>
  
  <pre><code>    //object1
      String name1= keyb.nextLine();
      int age1= keyb.nextInt();
      int monthborn1;
  
      //object2
      String name2=keyb.nextLine();
      int age2 = keyb.nextInt();
      int monthborn2;
  </code></pre>
  
  <p>I need to make a method that compare both objects and sees if they are equal or not.</p>
  
  <p>Thank you very much.</p>