Studyon Minte9.com
Java SE




Value exists




package testexample; public class Testexample { public static void main(String[] args) { String[] ss = {"Zero", "One", "Two"}; if (ss[2] != null) System.out.println(ss[2] + " exists"); // Outputs: Two exists } }
 


http://stackoverflow.com/questions/12897615/java-check-if-array-item-exists