How will you convert an ArrayList to Arrays?

Answer Posted / ramesh

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

Object[] obj=arr_obj.toArray();

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between checked exception and unchecked exception?

747


Why do we need array in java?

746


When throw keyword is used?

793


What is collection sort in java?

762


how we can create packages in java?

714


What is variable declaration and definition?

745


What are the basic concepts of OOPS in java?

759


What is the final keyword denotes?

870


What is import java util arraylist?

874


Why set do not allow duplicates in java?

765


What is an abstract method in java programming?

799


Describe different states of a thread.

777


Does sprintf allocate memory?

819


Difference between linkedlist and arraylist.

807


What is numel matlab?

998