Output is good, can anyone tell me what's wrong?
package com.codegym.task.task28.task2805;
/*
Thread priorities
*/
public class Solution {
public static void main(String[] args) {
for (int i = 0; i < 12; i++) {
System.out.print(new MyThread().getPriority() + " ");
}
// Output
// 1 2 3 4 5 6 7 8 9 10 1 2
System.out.println();
ThreadGroup group = new ThreadGroup("someName");
group.setMaxPriority(7);
for (int i = 0; i < 12; i++) {
System.out.print(new MyThread(group, "name" + i).getPriority() + " ");
}
// Output
// 3 4 5 6 7 7 7 7 1 2 3 4
}
}