开发者

Java - see if a list module contains a certain value

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜