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 six ways to use this keyword?

602


What is treemap in java?

546


List types of storage classes in java?

613


how can i use a nonsynchronized hashtable?

2094


What is this keyword used for?

679






what is thread? What are the high-level thread states? : Java thread

780


What are the types of relation?

561


What are java packages?

578


Which method cannot be overridden in java?

585


Differences between external iteration and internal iteration?

570


Explain the importance of import keyword in java?

517


What is an empirical question?

535


What is flush buffer?

510


What is the use of accept () method in java?

602


What is static import in java?

525