Home How can I test if an array contains a certain value?
Reply: 0

How can I test if an array contains a certain value?

user290
1#
user290 Published in May 21, 2018, 11:17 am

I have a String[] with values like so:

public static final String[] VALUES = new String[] {"AB","BC","CD","AE"};

Given String s, is there a good way of testing whether VALUES contains s?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.458501 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO