Hi
i have an arraylist thats keeping a track of members, i need to remove a member and have the list push all other elements down by 1. Please help
ArrayList<Membership> member; ArrayList<Books> book; private int nextMemberID; private int nextBookId; /** * Constructor for objects of class Library */ public Library() { nextMemberID = 1; nextBookId = 1; member = new ArrayList<Membership>(); book = new ArrayList<Books>(); } public void removeMember(int ID) { //First we find the lot with the given number Membership membership = getMember(ID); if (membership != null) { //Then we can use the method remove with lot as argument member.remove(membership); nextMemberID--; } }