-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMin.java
More file actions
27 lines (18 loc) · 737 Bytes
/
Min.java
File metadata and controls
27 lines (18 loc) · 737 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
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Min {
public static void main(String[] args) {
System.out.println(Arrays.toString(map("2001:xcv:dfvdasdv:asdfgv:asdfg:dsfgds:adfg")));
}
public static String @NotNull [] map(String ipv6){
StringTokenizer qwerty = new StringTokenizer(ipv6, ":");
String[] a = new String[qwerty.countTokens()];
System.out.println(qwerty.countTokens());
for (int i = 0; i < a.length; i++){
a[i] = qwerty.nextToken();
System.out.println(a[i]);
}
return a;
}
}