I want to store the parameters that the user enter into an array call "pupil" but I can't do it
This is the code:
public class Main
{
public static void main(String[] args) throws Exception
{
Pupil ingr;
char createProd;
int counter=0;
do{
System.out.println(" Do you want to start to enter products s/n");
createProd= (char)System.in.read();
System.in.read();
if (createProd!= 'N')
{
ingr= new Pupil();
String id = Console.readLine("Identification");
int idd = Integer.parseInt(id);
String name = Console.readLine("Name:");
String lastname= Console.readLine("Lastname:");
String age = Console.readLine("age");
int aged1= Integer.parseInt(age);
ingr.setId(idd);
ingr.setName(name);
ingr.setSurname(surname );
counter++;
}
} while (createProd== 'S');
//DataBase bd = new DataBase ();
DataBase .getPupilsDetails();
}
}