Code example for Queue

Methods: clearisEmpty

0
	public int pollColor(){ 
		return colorQueue.poll(); 
	} 
	 
	public void resetQueue(){ 
		if (colorQueue.isEmpty() == false)
			colorQueue.clear();
	} 
	 
	public void additionalColor(){ 
		if (colorQueue.size() < maxColor){
			Random random = new Random();
			while (colorQueue.size() <= maxColor)
				colorQueue.add(randomInteger(0, 6, random));
		} 
	} 
	 
	//create a random number between "start" to "end" 
	private static int randomInteger(int start, int end, Random random) {
		int range = end - start + 1;
Connect your IDE to all the code out there  Get Codota for Java