Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to clear LinkedList

Java: How to  clear LinkedList
{filelink=5198}

import java.util.LinkedList;
public class Ex_LinkedList
{
  public static void main(String[] args)
  	{
    LinkedList ma_Liste = new LinkedList();
    ma_Liste.add("A");
    ma_Liste.add("B");
    ma_Liste.add("C");
    System.out.println("LinkedList contains : " + ma_Liste);
    // remove all of items from the LinkedList
    ma_Liste.clear();
    System.out.println("LinkedList contains : " + ma_Liste);
  }
}

Users who found this page were searching for:

  • progressmonitor
  • reading email with pop3 perl
  • how to clear a linked list java
  • clear linkedlist java

No comments yet.

Leave a Comment