collections  -  converting to Arrays

 

■   Creating Arrays from Collections and Maps:

 

Object[ ] a = yourlist.toArray( );            Creates an array containing the elements in a list

Object[ ] a = yourset.toArray( );             Creates an array containing the elements in a set

Object[ ]  a = yourmap.keySet( ).toArray( ); Creates an array containing the keys in a map

Object[ ]  a = yourmap.values( ).toArray( ); Creates an array containing the values in a map