更新时间:2023-12-06 16:50:04
如果要将对象添加到数组列表中,创建你的类类型的数组列表,你可以像这样添加它,
If you want to add the objects to the arraylist, Create the arraylist of your class type and you can add it something like this,
ArrayList<Phone> phoneList = new ArrayList<>();
phoneList.add(new phone("id", "phoneNumber", "firstName", "lastName"));