I have an ArrayList
defined as:
ArrayList<String[]> params=new ArrayList<String[]>();
It contains parameters ("name", value) in String Arrays. I would like to insert elements in the ArrayList
:
params.add({"param1", param1});
But when I try that I get an error.
What is the simplest way to add String Arrays in ArrayList
. Do I have to declare a new array each time?
Map
.name/value
you might want to look at the Map interface