khaleel. Powered by Blogger.

Enumeration

Wednesday 22 June 2011

import java.util.*;
public class EnumerationDemo {

   
    public static void main(String[] args) {
        Vector v=new Vector();
        for(int i=0;i<10;i++){
            v.addElement(i);
        }
        Enumeration e=v.elements();
        while(e.hasMoreElements()){
            Integer g=(Integer) e.nextElement();
            System.out.println(g);
        }
        /*while(e.hasMoreElements()){
            System.out.println(e.nextElement());
        }*/
        }
    }


0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
Promote Your Blog

About This Blog

This blog is for java lovers

Total Pageviews

About Me

khaleel-bapatla
BAPATLA, ap, India
simple and honest
View my complete profile

  © Blogger template On The Road by Ourblogtemplates.com 2009

Back to TOP