24 lines
489 B
Java
24 lines
489 B
Java
import java.util.*;
|
|
|
|
public class Program {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
var arr = new ArrayList<Integer>();
|
|
|
|
arr.add(-4);
|
|
|
|
var pq = new PriorityQueue<Integer>();
|
|
pq.add(1);
|
|
pq.add(5);
|
|
pq.add(-3);
|
|
pq.add(-7);
|
|
|
|
System.out.printf("Hello World: %d\n", pq.remove());
|
|
System.out.printf("Hello World: %d\n", pq.remove());
|
|
System.out.printf("Hello World: %d\n", pq.remove());
|
|
System.out.printf("Hello World: %d\n", pq.remove());
|
|
}
|
|
|
|
}
|