Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

java check if element exists in array

	// Convert to stream and test it
	boolean result = Arrays.stream(alphabet).anyMatch("A"::equals);
	if (result) {
		System.out.println("Hello A");
	}
Copy
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #java #check #element #exists #array
ADD COMMENT
Topic
Name
7+8 =