I need to create an input method that is void and call it from the main method.
Then I'd like to instantiate an object in a loop such asCode:public void input()
{
age=Integer.parseInt(JOptionPane.showInputDialog("Enter your age"));
name=JOptionPane.showInputDialog("Enter your name");
setAge(age);
setName(name);
}
Code:for (int i=0; i<l.length; i++) //loops through the array
{
l[i].input();
name=l[i].getName();
age=l[i].getAge();
l[i]=new Listing(name,age);
}

