Queue - Java
 |
Java Programming
|
Queue Class
The class of Queue with initialization max size, queue array for making an array, front of data value, rear of data value and more items in queue array .
Queue Method
It's make an array with queue mode. This method used a FIFO (First in First out) mode with -1 every inserted a value in queue array.
Insert Method
This method used for inserting value for queue array and rear declared with max size - 1 and the items of queue array will be increased.
Remove Method
Remove method is used for removing value in the queue array and moving forward n queue elements to value that removed.
Peek Method
This method used to retrieve or fetch the first element of the queue array or the element present at the top of queue array.
Is Empty Method
This method is for checking an array and operating an array with no items in array.
Is Full Method
This method is for checking an array and operating an array with items in array. So it's same with max size an queue array
Size Method
Size method is used for how many value can inserted in queue array
Main Method
Main method used for operating this queue array like inserting value and removing value in queue array