title: Java method to format String fields
body: <p>class Person holds personal data </p>
  
  <p>Its constructor receives 3 parameters, two Strings representing first and last names and an int representing age</p>
  
  <pre><code>public Person(String firstName, String lastName, int age) 
  </code></pre>
  
  <p>its method <code>getName</code> has no parameters and returns a <code>String</code> with format "Lastname, Firstname"<br />
  its method <code>getAge</code> takes no parameters and returns an int representing the current age<br />
  its method birthday increases age value by 1 and returns the new age value </p>
  
  <p>Create the class Person and paste the whole class into the textbox below </p>
  
  <pre><code>    public class Person
  {   
         private String Firstname;
          private String Lastname;
          private String Name1;
          private int getAge;
          private int birthday;
          private int newAge;
          private int age1;
  
  
  public Person(String first, String last, int age)
      {
        Firstname = first;
        Lastname = last;
          age1 = age;
  
  
      }
         public String getName()
             {
         String getName = "Lastname , Firstname";
         Name1 = Lastname + ", "  + Firstname;
         return Name1;
  
      }
          public int getAge()
          {
         return age1;
  
      }
  
          public int birthday()
          {
  
         age1++;
         return age1;
  
  
      }
  
  }
  </code></pre>
  
  <p>i fixed it all, thanks for your help guys!</p>