We can convert enumeration to arraylist in java with the help list() method of Collections.
package javaproficeincy;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Vector;
public class EnumerationToList {
public static void main(String[] args) {
Vector<String> vt = new Vector<String>();
vt.add(“java”);
vt.add(“php”);
vt.add(“array”);
vt.add(“string”);
vt.add(“c”);
Enumeration<String> enm = vt.elements();
List<String> ll = Collections.list(enm);
System.out.println(“List elements: “+ll);
}
}
Output:
List elements: [java, php, array, string, c]
Related Posts :
wow this is the thing i was looking for
thanks for sharing wonderful blog with us. its really more helpful to our institute candidates to get aware some useful knowledge keep sharing more information.
Dot Net training in Chennai
Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.
SEO Company in Chennai
nice and really helpful article to everyone… thanks for sharing
selenium training in chennai | selenium training institute in chennai | Android training in chennai | android training institute in chennai
I have read your blog its very attractive and impressive. I like it your blog.
Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai
Java Online Training Java Online Training Core Java 8 Training in Chennai Java 8 Training in Chennai JavaEE Training in Chennai JavaEE Training in Chennai
Great and useful article.
SCM training in chennai
Thanks for sharing this program.It is really helpful.Continue sharing more like this.
Regards,
Java Training in Chennai | Java Training Institutes in Chennai | Java courses in Chennai
Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information.
Best hadoop training institute in chennai|Hadoop Training Chennai|Hadoop Training in Chennai
Excellent post!!! Your article helped to under the future of java development. Being an open source platform, java is integrated in most of the software development industries to create rich featured applications.Java Course in Chennai | Best JAVA Training in Chennai
Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
Regards,
cloud computing training in chennai|cloud computing training
Excellent post!!! The future of cloud computing is on positive side. With most of the companies integrate Salesforce CRM to power their business; there is massive demand for Salesforce developers and administrators across the world.Salesforce Training in Chennai | Salesforce Training Institutes in Chennai
Hi, Really your post was very informative. Today's internet era learn Hadoop Online Training will helps you to reach your goal.Selenium Training
Nice sharing. R is a language and environment for statistical computing and graphics. Want to make a career in R Programming. Learn R Programming Training course @ GangBoard. We are the best provider of online training on evergreen technologies.
It's very best beneficial blogs.I read this subjects blog such a great blog and good sharing I'll be like this information post.
Selenium Training in Chennai
Selenium Training