Beruflich Dokumente
Kultur Dokumente
if (round != queu.length){
data=queu[front];
queu[front]=0;
queu1[front1]=null;
front++;
front1++;
count--;
}
else{
System.out.println("queu not contain any high priority ");
}
return data;
}
public static void main (String [] args){
DoubleQueu obj=new DoubleQueu (6);
try{
obj.enque(45, "normal");
obj.enque(78,"low" );
obj.enque(48,"high" );
obj.enque(78,"low" );
System.out.println("the value of the queu is "+ obj.queu[0] +" status i
s "+ obj.queu1[0] );
System.out.println("the value of the queu is "+ obj.queu[1]+" status is
"+ obj.queu1[1]);
System.out.println("the value of the queu is "+ obj.queu[3]+" status is
"+ obj.queu1[3]);
obj.enque(78,"normal" );
obj.enque(88,"low" );
int data =obj.dequeu();
System.out.println ("the deletion value is =" + data);
obj.enque(98,"low" );
}catch(ArrayIndexOutOfBoundsException ex ){
System.out.println("exception occured "+ex.getMessage());
}
System.out.println("the value of the queu is "+ obj.queu[4]+" status is
"+ obj.queu1[4]);
System.out.println("the value of the queu is "+ obj.queu[5]+" status is
"+ obj.queu1[5]);
System.out.println("the value of the queu is "+ obj.queu[2]+" status is
"+ obj.queu1[2]);
}
}