?? process.java
字號:
package algo;
public class process extends Thread implements Resource {
int Max[];
int Need[]=new int[kinds];
int Allocation[];
int prime=0;
String name="unnamed";
public process(){
Max=new int[kinds];
Allocation=new int[kinds];
Need=new int[kinds];
}
public void run(){
}
public process(int[] max ){
this.Max=max;
this.newNeed();
}
public process(int[] max,int[] allocation){
for(int i=0;i<kinds;i++){
if(max[i]<allocation[i]){
System.out.println("alocation["+i+"] larger than max ");
return;
}
}
if(max.length==allocation.length){
this.Max=max;
this.Allocation=allocation;
this.newNeed();
}
else
System.out.println("unfit!");
}
public void newNeed(){
for(int i=0;i<kinds;i++){
Need[i]=Max[i]-Allocation[i];
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -