How will you convert an ArrayList to Arrays?

Answer Posted / vikneswarank

Using toArray() method for example

ArrayList arr_obj=new ArrayList()
arr_obj.add("viki");
arr_obj.add("siva");

Object[] obj=arr_obj.toArray();

for further Detail go to my website :
http://www.beexpert.co.in/

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 32 bit float?

767


Which are different kinds of source code?

890


What are the two types of streams offered by java 8?

698


What is regex java?

804


What are the differences between abstract class and interface?

764


Name few java 8 annotations ?

798


How do you create a bulleted list?

836


What is the full meaning of java?

788


Explain about abstract classes in java?

816


How to check if a list is sorted in java?

795


Explain what are final variable in java?

804


What is a nested structure?

740


What is string builder?

662


Why we go for collections in java?

762


Can we assign integer value to char in java?

717