About 1,120,000 results
Open links in new tab
  1. Java Program for Linear Search - GeeksforGeeks

    Apr 9, 2025 · Given an array a [] of n elements, write a function to search for a given element x in a [] and return the index of the element where it is present. If the element is not present in the array, then return -1. Input/Output: Algorithm for Linear Search. Declare an array and search element as the key. Traverse the array until the number is found.

  2. Java Program for Linear Search - CodesCracker

    Java Program for Linear Search - This article covers multiple programs in Java that find and prints the position(s) of an element in an array entered by user at run-time of the program, using linear search technique.

  3. Linear Search in Java - Tpoint Tech

    Linear search, also known as sequential search, is a straightforward method for finding an element within a list. It checks each element of the list sequentially until it finds a match or reaches the end of the list.

  4. Java program for linear search – Example - BeginnersBook

    Sep 10, 2022 · This program uses linear search algorithm to find out a number among all other numbers entered by user. * Written by: Chaitanya from beginnersbook.com. * Input: Number of elements, element's values, value to be searched.

  5. Java Program to Perform a Linear Search - 3 Ways - Tutorial …

    Write a Java program to perform a linear search on arrays using the for loop traverses array and if statement, and functions with examples.

  6. Linear search in Java: Introduction, Syntax & Examples

    Apr 9, 2025 · Linear Search in Java is a valuable tool to find the position of a target value within a collection, like an array or a list, by sequentially checking each element until a match is found.

  7. arrays - Performing Linear search in Java - Stack Overflow

    Sep 16, 2022 · Write a Java program that stores 5 values in an array. Ask the user to input a value to look for. Perform a Linear Search to look for the inputted value.

  8. User input with linear and binary searching in java

    Jan 29, 2014 · I'm trying to write a program that asks the user to input the size of the array the user wants to create, and then asks the user to fill the array with elements, and then it should display the array with its elements and, ask the user to conduct a search for an integer.

  9. Linear Search in Java: Essential Method for Finding Data - Newtum

    May 10, 2023 · Explore the basics of Linear Search in Java, from predefined values to user input. Discover tips for searching & real-world applications.

  10. Write a program to search for an integer value input by the user

    Write a program to search for an integer value input by the user in the list given below using linear search technique. If found display "Search Successful" and print the index of the element in the array, otherwise display "Search Unsuccessful".

  11. Some results have been removed
Refresh