tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 
 Tools and Libs > Ostermiller Utilities > Array to Enumeration

Array to Enumeration 

Ostermiller Java Utilities contain various components such as CSV parsing, Base64 Encoding, MD5 digest, String and Exec Helper classes. This requires the library ostermillerutils-1.08.01.jar to be in classpath. The following example shows converting an Array to Enumeration.

File Name  :  
com/bethecoder/tutorials/ostermillerutils/Array2EnumerationTest.java 
Author  :  Sudhakar KV
Email  :  kvenkatasudhakar@gmail.com
   
package com.bethecoder.tutorials.ostermillerutils;

import java.util.Enumeration;

import com.Ostermiller.util.ArrayEnumeration;

public class Array2EnumerationTest {

  /**
   @param args
   */
  public static void main(String[] args) {
    Enumeration<String> enu = new ArrayEnumeration<String>(
          new String [] { "ONE""TWO""THREE""FOUR" }
    );
    
    while (enu.hasMoreElements()) {
      System.out.println(enu.nextElement());
    }
  }

}
   

It gives the following output,
ONE
TWO
THREE
FOUR


                    Print

   



Books Recommendation

 
 
bl  br