Example & Tutorial understanding programming in easy ways.

How to obtain Array from an ArrayList ?

Array can be obtained from an ArrayList using toArray() method on ArrayList.
 List<String> list = new ArrayList<String>();
 list.add("India");
 list.add("Switzerland");
 String [] countries = list.toArray(new String[list.size()]);

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!