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

Java: How to use for each loop to go through elements in a linkedlist

Java: How to use for each loop to go through elements in a linkedlist
{filelink=5182}

import java.util.LinkedList;
public class Linked_ForEach
 {
  public static void main(String[] a)
  	 {
    LinkedList ma_Liste = new LinkedList();
    for (char n = 'a'; n <= 'j'; n++)
      ma_Liste.add(n);
    for (char s : ma_Liste)
      System.out.println(s);
  }
}

Users who found this page were searching for:

  • how to go through each combination of elements java
  • python if key pressed example
  • java unstatis filelink exception

No comments yet.

Leave a Comment