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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

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