How will you convert an ArrayList to Arrays?

Answer Posted / tapan kumar kundu

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 ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is thread count in java?

729


What are selection structures?

738


What is the difference between the boolean & operator and the && operator in java programming?

769


What does  mean in regex?

765


How do you compare characters in java?

726


What is an inner class in java?

716


Which package is used for pattern matching with regular expressions?

851


What is a protected method?

846


Write a code to show a static variable?

833


What is array initialization in java?

701


Can we assign the reference to this variable?

736


What are the special characters?

731


Define an abstract class with reference to java.

776


What is the finalize method do?

817


Why is stringbuffer not immutable?

771