exam3_4.java
来自「关于数据结构的JAVA源代码」· Java 代码 · 共 21 行
JAVA
21 行
public class Exam3_4{
public static void main(String[] args) throws Exception{
SeqPQueue myQueue = new SeqPQueue();
Element temp;
myQueue.append(new Element(new Integer(1),30));
myQueue.append(new Element(new Integer(2),20));
myQueue.append(new Element(new Integer(3),40));
myQueue.append(new Element(new Integer(4),20));
myQueue.append(new Element(new Integer(5),0));
System.out.println("进程号 优先级");
while(myQueue.notEmpty()){
temp = myQueue.delete();
System.out.print(temp.getElem()+" ");
System.out.println(temp.getPriority());
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?