Answers for "method to check if the element exists in an array in hava"

7

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
Posted by: Guest on April-07-2020

Code answers related to "method to check if the element exists in an array in hava"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language