From bcdc65c770ce59703b77154f5a6fe24858c1d7dc Mon Sep 17 00:00:00 2001 From: dgavio Date: Fri, 5 Oct 2018 14:43:49 +0200 Subject: [PATCH] Linear search implemented in Java. --- java-linear-search/LinearSearch9.java | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 java-linear-search/LinearSearch9.java diff --git a/java-linear-search/LinearSearch9.java b/java-linear-search/LinearSearch9.java new file mode 100644 index 0000000..063cb9e --- /dev/null +++ b/java-linear-search/LinearSearch9.java @@ -0,0 +1,34 @@ +import java.util.ArrayList; +import java.util.Scanner; + +public class LinearSearch9 { + public static void main(String args[]){ + + ArrayList integerArrayList = new ArrayList<>(); + Scanner scanner = new Scanner(System.in); + System.out.println("Enter the length of the integer arraylist"); + int length = scanner.nextInt(); + for(int i = 0; i integerArrayList) { + for (int i = 0; i