-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram.java
More file actions
26 lines (18 loc) · 800 Bytes
/
program.java
File metadata and controls
26 lines (18 loc) · 800 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
import java.util.HashMap;
import java.util.Map;
public class program {
public static void main(String[] args) {
int size = methods.inputNum("Введите размер массива: ");
int[] numbers = methods.fillArray(size);
System.out.println("Массив целых чисел:");
methods.showArray(numbers);
System.out.println("\n");
System.out.println("Словарь частот: ");
Map<Integer,Integer> dictionary = new HashMap<Integer,Integer>();
dictionary = methods.fillDict(dictionary, numbers);
System.out.println(dictionary.toString());
System.out.println("\n");
System.out.println("Или в более красивом виде:");
methods.showDict(dictionary);
}
}