-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathArray.java
More file actions
23 lines (19 loc) · 483 Bytes
/
Array.java
File metadata and controls
23 lines (19 loc) · 483 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import java.util.*;
public class Array
{
public static void main(String[] args)
{
System.out.print("\n" + "Sort Array:" + "\n");
String[] x = {"bravo","delta","alpha","echo","foxtrot","charlie"};
Array.sort(x);
System.out.print("\n");
}
public static void sort(String[] items)
{
Arrays.sort(items);
for(String item : items)
{
System.out.print("item = " + item + "\n");
}
}
}