Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified
Accepted Solution




In .net we have ArrayList class , which can be used for creating array, clear the contents , add elements.


Do we have some think like this in blackberry jaa??


i tried using Arrays class, but its giving me error



public static Arrays aInfoserverlist = new Arrays();

this gives me error as

"Arrays() has private access in net.rim.device.api.util.Arrays"


I need to create array , which will accept strings , clear it , add new one , copy to another array


any solution??


Thanks in advance !






Posts: 147
Registered: ‎09-10-2008
My Device: Not Specified

Re: ArrayList

[ Edited ]

Try using Vectors instead of arrays.


Sample Code will give some idea similar to array functionality:


import java.util.Vector;


Vector SSV1 = new Vector();


//To Add Elements

SSV1.addElement("Name of the string");


//To set / Modify Elements at Specified index

SSV1.setElementAt(Temp1, IndexID);


//To Remove the particular Elements




Message Edited by saravanaboopati on 03-30-2009 06:13 AM
Posts: 330
Registered: ‎02-25-2009
My Device: Not Specified

Re: ArrayList

hey thanks .. it worked
New Contributor
Posts: 2
Registered: ‎11-13-2011
My Device: 8520
My Carrier: Airtel

Re: ArrayList

What will we do for GENERIC ARRAY LIST?

Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

Re: ArrayList

public ByteVector cpu_config = new ByteVector();


public void setConfigInt(char key, int value) {

//ByteVector method
cpu_config.addElement((byte) key);
byte[] arr = Util.itob(value);


-Fight with BB10