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 compareto?

535


Is singleton set an interval?

524


How many types of voids are there?

527


What is get () in java?

557


What is final method?

576






What is mvc in java?

549


Define an applet in java?

624


What is the r character?

580


Can we make constructors static?

713


We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.

1479


How many bits is a string?

518


Is object a data type?

550


What are passing parameters?

580


What is are packages?

577


Explain method local inner classes ?

584