Java Queue create from LinkedList

Description

Java Queue create from LinkedList

import java.util.LinkedList;
import java.util.Queue;

public class Main {
  public static void main(String[] args) {
    Queue<String> myQueue = new LinkedList<String>();
    myQueue.add("CSS");
    myQueue.add("HTML");
    myQueue.add("Java");
    myQueue.add("Javascript");

    System.out.println(myQueue);// w w w.j a  v a2s. c  o m
  }
}



PreviousNext

Related