Queue Collections Learn programming Java

Lesson:

Dynamic Memory Management


Exercise:

Queue Collections 13


Objetive:

Queue-Collections


Code:

import java.util.*;
public class Main
{
	public static void main(String[] args)
	{
		boolean depurando = true;

		LinkedList miCola = new LinkedList();
		miCola.offer("Hola,");
		miCola.offer("soy");
		miCola.offer("yo");

		int cantidadCola = miCola.size();

		for (byte i = 0; i < cantidadCola; i++)
		{
			System.out.println(miCola.poll());
		}

		if (depurando)
		{
			new Scanner(System.in).nextLine();
		}
	}
}