two person object
<pre><code>import cs1.Keyboard;
import java.util.Scanner;
class Person 
{
    private String name;
    private String persnr;
    private String adress;
    private int age;

    public Person(String _name, String _persnr, String _adress, int _age) 
    {
        name = name;
        persnr = persnr;
        adress = adress;
        age = age;
    }

    public void byterNamn(String _name)
    {
        name = _name;
    }

    public void byterAdress(String _adress)
    {
        adress = _adress;
    }

    public void fyllerAr()
    {
        age = age + 1;
    }

    public String hamtaNamn()
    {
        return name;
    }

    public String hamtaPersonnmmer()
    {
        return persnr;
    }

    public String hamtaAdress()
    {
        return adress;
    }

    public int hamtaAlder()
    {
        return age;
    }

    public String toString()
    {
    String _toString;
    _toString = "Namn: " + name + "\nÅlder: " + age;
    _toString = _toString +  "\nPersonnummer: " + persnr + "\nAdress: " + adress;
    return _toString;
    }

     public p1()
     {
       System.out.print("namn: ");
        name = Keyboard.readString();    

        System.out.print( "adress: " );
        String adress = Keyboard.readString();

        System.out.print( "ålder: " );
        Integer age = new Integer(); 
        age.parseInt(Keyboard.readint());

        System.out.print( "personnummer: " );
        String persnr = Keyboard.readString();

     }
     public p2()
     {
       System.out.print("namn: ");
        name = Keyboard.readString();    

        System.out.print( "adress: " );
        String adress = Keyboard.readString();

        System.out.print( "ålder: " );
        Integer age = new Integer(); 
        age.parseInt(Keyboard.readint());

        System.out.print( "personnummer: " );
        String persnr = Keyboard.readString();
     }

    public static void main(String[] args) 
    {
        String name = Keyboard.readString();
        String persnr = Keyboard.readString();
        String adress = Keyboard.readString();
        int age = Keyboard.readint(); 
        Person p1 = new Person(name, age, adress, personnummer);

        String name = Keyboard.readString();
        String persnr = Keyboard.readString();
        String adress = Keyboard.readString();
        int age = Keyboard.readint(); 
        Person p2 = new Person(name, age, adress, personnummer);

    }
}
</code></pre>

<p>hello.
I try to do so it is 2 people. where you should enter the age, name, address of both people and then print it after you enter what you want when the program runs. and i wondering how do i do return on public p1() and public p2() so i can do it. Or is it a easier way to do it?</p>
