About 1,980,000 results
Open links in new tab
  1. 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 …

  2. arrays - Linear search for Strings in Java - Stack Overflow

    Jul 26, 2019 · I'm working on a code where a user inputs ten strings which is store in an array, and a search key. The code has to run a linear search based on the search key. So far this is …

  3. Java Program for Linear Search - CodesCracker

    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. List of …

  4. Class 10 ICSE - Java Array Searching Programs - Alex Sir

    Program 1: Write a program to enter numbers in array and find the desired number using linear search and display its position. Solution: public static void main(String[] args) . int n, x, flag = 0, …

  5. Linear Search | Video Tutorials for ICSE Computer

    Let's look at the Java program for Linear Search in BlueJ and understand it’s working. public class LinearSearchDemo . public static void main (String args []) { Scanner in = new Scanner …

  6. Linear Search in Java with Examples - Javacodepoint

    Jan 5, 2025 · Linear Search is a simple search algorithm that scans the array sequentially and compares each element with the key (target value). If the key is found, it returns the index; …

  7. Linear Search Program in Java

    import java.util.*; public class LinearSearch { public static void main(String[] args) { int n, pos = -1; boolean flag = false; int ar[] = new int[10]; Scanner sc = new Scanner(System.in); for (int i = 0; …

  8. 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.

  9. 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 …

  10. Java linear search program - W3schools

    Linear search is a way of finding a target value within a collection of data. It is also known as sequential search. It sequentially checks each element of the collection data for the target …

Refresh