You create a new reception’s object on every cycle iteration. Try to put this definition before the cycle and use this object in the cycle. Also, you’ll need to write an empty constructor and getters/setters for values:
reception add=new Reception();
do {
...
add.setNumerodehotel(x);
add.setResidente1(name);
} while (...)
public abstract class Hotel {
ArrayList<Integer> numerodehotel = new ArrayList<Integer>();
ArrayList<String> residente1 = new ArrayList<String>();
public Hotel(){
}
public void setNumerodehotel(int number){
this.hotelroomnumber.add(number);
}
public void setResidente1(String resident){
this.resident1.add(resident);
}
}
solved ArrayList clearing itself in every iteration