package main;
import java.util.ArrayList;
public class UserGroup {
ArrayList userGroup = new ArrayList<>();
User userOne;
public UserGroup() {
It's working good :
` public static void main(String[] args) {
UserGroup MyUser = new UserGroup();
for (User curUser : MyUser.getUserGroup()) {
System.out.println(curUser.toString());
}
MyUser.removeFirstUser();
System.out.println("your user removed!");
for (User curUser : MyUser.getUserGroup()) {
System.out.println(curUser.toString());
}
}`
RESULT :
`User@4554617c 1
User@74a14482 2
User@1540e19d 3
your user removed!
User@74a14482 1
User@1540e19d 2`