-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathArray56.java
More file actions
27 lines (25 loc) · 658 Bytes
/
Array56.java
File metadata and controls
27 lines (25 loc) · 658 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
25
26
27
package array;
import array.uitl.ArrayUtil;
/**
* Project Admin -> Husanboy Azamov
* Package Name -> array
* Class Name -> Array56
* Copyright © : 6/26/2022
*/
public class Array56 {
public static void main(String[] args) {
array56(new int[]{
1,2,3,4,5,6,7,8,9,10,11,12,13,14
});
}
public static void array56(int [] array){
int counter=0;
int[] array2 =new int[array.length];
for (int i = 0; i < array.length; i+=3) {
array2[counter]=array[i];
counter++;
}
System.out.println("Array Size: "+counter);
ArrayUtil.show(array2);
}
}