About 377,000 results
Open links in new tab
  1. Java Program to Search Key Elements in an Array - Sanfoundry

    Here is the source code of the Java Program to Search Key Elements in an Array. The Java program is successfully compiled and run on a Windows system. The program output is also …

  2. How to search for a specific element in an xml using a Scanner in java ...

    Sep 2, 2013 · I want to be able to search for name, like tim, using a Scanner and then using that name, display all the information on that goes along with that name. for instance if john was …

  3. java - How to put a Scanner input into an array... for example a …

    Jul 10, 2018 · Scanner input = new Scanner(System.in); double[] numbers = new double[5]; for (int i = 0; i < numbers.length; i++) System.out.println("Please enter number"); numbers[i] = …

  4. Java using scanner to access array elements - Stack Overflow

    Nov 18, 2013 · I've created an array 8 elements long using the scanner class. I'm trying to accept user inputs via scanner and print out the value at that index location. eg if the user enters '2', it …

  5. Java Program to Implement Binary Search Algorithm

    Enter element to be searched: 6 Element found at index 3. Here, we have used the Java Scanner Class to take input from the user. Based on the input from user, we used the binary search to …

  6. Linear Search In Java Program – 2 Simple Ways | Programs - Java

    6 days ago · 1) We are searching the key in the array. 2) Read the array length and store the value into the variable len, read the elements using the Scanner class method and store the …

  7. Scanner (Java Platform SE 8 ) - Oracle Help Center

    A simple text scanner which can parse primitive types and strings using regular expressions. A Scanner breaks its input into tokens using a delimiter pattern, which by default matches …

  8. Java Scanner - Baeldung

    Jan 5, 2024 · A quick and practical set of examples for using the core Scanner Class in Java - to work with Strings, Files and user input.

  9. Write a program to search an element in an array - Tutor Joes

    import java.util.Scanner; class Array_Search_Element {public static void main (String [] args) {Scanner input = new Scanner (System. in); System. out. print ("Enter the Array Limit :"); int l = …

  10. Java Program for Linear Search - GeeksforGeeks

    Apr 9, 2025 · Linear Search is the simplest searching algorithm that checks each element sequentially until a match is found. It is good for unsorted arrays and small datasets. Given an …

Refresh