Home > DeveloperSection > Forums > In Java, how can I test if an Array contains a certain value?
ben reitman
ben reitman

Total Post:96

Posted on    May-08-2015 1:08 AM

 Java Java  Array 

 2 Reply(s)
 721  View(s)
Rate this:
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?

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    May-08-2015 6:28 AM


wushiwu08 wushiwu08
wushiwu08 wushiwu08

Total Post:3

Posted on    May-09-2015 12:33 AM

Post is removed by the Admin.

Don't want to miss updates? Please click the below button!

Follow MindStick