Get all updates of Java4s
Follow Us: Email Newsletter

How To Convert ArrayList to String Array In Java

Core Java » On Sep 27, 2012 { 15 Comments } By Sivateja

Hi friends,  In java some times we may need some conversions from collection objects to some thing, ArrayList to String array is very popular conversion we are using in our projects :-)


Line number 8 created ArrayList object
Line numbers 10,11,12,13,14 added data into list object
Line number 16 created String array, and at 17 we converted List data into String array

Finally output ;)

You Might Also Like

  ♦ About Author ♦

Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.


15 Responses to “How To Convert ArrayList to String Array In Java”
  1. prasad says:

    why comparable and comparator two interfaces are there is java one is enough to sort and why comparable is in java.lang and why comparator is in java.util ?

  2. Your technical information related with java programming is very useful and interesting. Also share updated details about java in your website. Thanks for sharing this article.

  3. jayendra says:

    Awesome I want more collections tricky questions

  4. This information you provided in the blog that was really unique I love it!!, Thanks for sharing such a great blog..Keep posting..

  5. Pankaj+Tyagi says:

    Are you create a scenario that is use only comparable interface not use campartor and revese

  6. Divakar Singh says:

    Really your blog is unique and understandable for new learner…..Thanx

  7. reddy says:

    good answer brother

  8. eddie says:

    Nice articles, great job

    Find More information on Core Java Tutorials and Big Data

  9. Sriramasai Amajala says:

    i am very happy to learn in this site.

  10. RamKumar says:

    The concepts given are clear to understand and more helpful for beginners like me Thank you.

  11. ramyasreelanke says:

    Good tutorials with clear concept explaination helps for every one

  12. sudheer says:

    gud explanation……siva teja…..

  13. Prakash Bariya says:

    why comparable and comparator….

    assume you have one list of objects like student..
    requirement is something I want sorting by name,roll number and class.

    if you use comparable interface,you can sort by only one value

    when you use comparatore,you can done every sorting in one list

  14. balakrishna says:

    Hi sivateja Good Explanation.I Want more logical Answers from corejava. Thaks.


By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.