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