I am retrieving each and every value of a single record and copying it into another array variable and setting array using a bean class and then adding that bean class to an arraylist.While I am trying to print it shows only the last record repeatedly
try{
st=con.createStatement();
rs=st.executeQuery("select * from data");
while(rs.next()){
DataBean db=new DataBean();
for(int i=1;i<=tNumber;i++){
a[i]=rs.getFloat(i);
}
db.setArray(a);
al.add(db);
}
} finally {
...
}