We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6cd968 commit 6cfbbb0Copy full SHA for 6cfbbb0
Arrays/LinearStringSearch.java
@@ -8,12 +8,11 @@ public static void main(String[] args) {
8
System.out.println("'Input string array of what length you wish to input.");
9
int n = sc.nextInt();
10
String[] a = new String[n];
11
- System.out.println("Input "+n+" words into the string.");
+ System.out.println("Input "+n+" words into the string, make sure your array is sorted.");
12
for (int i = 0; i < a.length; i++) {
13
a[i] = sc.next();
14
}
15
- Arrays.sort(a);
16
- System.out.println("Sorted Array: ");
+
17
18
System.out.print(a[i]+"\t");
19
0 commit comments