Search an ArrayList for a particular Object

前端 未结 6 836
陌清茗
陌清茗 2021-01-21 07:05

I have a class called Person. It has the following attributes; It has 2 attributes, ID, and Telephone. 1 person can have many

6条回答
  •  走了就别回头了
    2021-01-21 07:42

    You need to iterate the array, check the persons one by one for phone number, and when you get to the one you need just assign it to a variable.

提交回复
热议问题