开发者

Java - see if a list module contains a certain value

开发者 https://www.devze.com 2023-01-12 06:08 出处:网络
Let\'s say I have this: public DefaultListModel model = new DefaultListModel(); how do i make it so I can see if it contains a certain string?

Let's say I have this:

public DefaultListModel model = new DefaultListModel();

how do i make it so I can see if it contains a certain string?

Th开发者_开发技巧anks


With the contains() method.

model.contains("MyString");


Use contains()

0

精彩评论

暂无评论...
验证码 换一张
取 消