About 548,000 results
Open links in new tab
  1. Java - search a string in string array - Stack Overflow

    Jul 12, 2016 · In java do we have any method to find that a particular string is part of string array. I can do in a loop which I would like to avoid. e.g. String [] array = {"AA","BB","CC" }; string x = …

  2. Check If a Value is Present in an Array in Java - GeeksforGeeks

    Apr 15, 2025 · There are numerous approaches to check whether a specific element is present in this Array or not in Java. These are, 1. Using Linear Search Method. In Linear Search, the list …

  3. Check if a Java Array Contains a Value - Baeldung

    Sep 7, 2024 · In this article, we’ll look at different ways to search an array for a specified value. We’ll also compare how these perform using JMH (the Java Microbenchmark Harness) to …

  4. How to Search an Array for a Matching String in Java?

    Searching for a specific string in an array in Java can be achieved through a simple iteration method that checks each element against the target string. This process can be implemented …

  5. Find Strings Containing a Substring in an Array - Javacodepoint

    Jan 25, 2025 · This program demonstrates a simple and efficient way to find strings containing a specific substring in an array. It strengthens your understanding of string manipulation and …

  6. java - How to Search a string array for specific strings - Stack Overflow

    Apr 25, 2013 · I am trying to search an array for a couple of specific strings that I get from words in a sentence. Eventually this sentence will be in-putted by the user but I have hard coded it in …

  7. Searching for a String in an ArrayList - Baeldung

    Apr 4, 2025 · In this tutorial, we’ll look into different ways to search for a String in an ArrayList. Our intent is to check if a specific non-empty sequence of characters is present in any of the …

  8. 5 ways to check if array contains a value in java - codippa

    Sep 9, 2017 · If the string exists in the array, then get the index of its position in array. This post will detail out 5 different methods to search a string in an array to check if the array contains it …

  9. Find a specific value in an array in Java - Sentry

    Jan 15, 2024 · We can achieve this for an array of any type using Java’s Stream API, introduced in Java 8. Streams are a method for processing collections of objects and can be used to …

  10. Searching Elements in an Array | Array Operations - GeeksforGeeks

    May 23, 2024 · In this post, we will look into search operation in an Array, i.e., how to search an element in an Array, such as: In an unsorted array, the search operation can be performed by …

Refresh