phani ravinutala wrote:
Do you realize that you are using the very same Emp instance and just update that one? In the end, your list will contain several references to that very same instance, which will contain the values of the last array elements. Move the "Emp emp = new Emp();" line into the loop, just before you set the name.