MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / main

Method main

Programs/LinearSearch.java:14–24  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

12 }
13
14 public static void main(String args[])
15 {
16 int arr[] = { 45, 56, 37, 79, 46, 18, 90, 81, 51 };
17 int x = 79;
18
19 int result = search(arr, x);
20 if (result == -1)
21 System.out.print("\n\nElement is not present in array\n");
22 else
23 System.out.print("\n\nElement is present at index " + result + "\n");
24 }
25}
26

Callers

nothing calls this directly

Calls 2

searchMethod · 0.95
printMethod · 0.80

Tested by

no test coverage detected