List型にcontainsを使う
+----------------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| uid | int(11) | YES | | NULL | |
| screenname | text | YES | | NULL | |
| item_name | text | YES | | NULL | |
| ArtistorAuthor | text | YES | | NULL | |
| nowDate | text | YES | | NULL | |
+----------------+---------+------+-----+---------+-------+
こうデータベースが入っている時、uidが重複する時だけListに入れない。重複しなければListに入れるってやつ
while(rs.next()) {
//同じuid(同じ人)はリストに入れない
if (!tuid.contains(rs.getInt("uid"))) {
tid.add(rs.getInt("id"));
tuid.add(rs.getInt("uid"));
screenname.add(rs.getString("screenname"));
item_name.add(rs.getString("item_name"));
}
}
とりあえず更新する記事ネタがないから今さっき打ってたゴミプログラムを投げる