Dear All,
I have vector of vectors
Vector VMaster - [[flag, 0,1,1], [state, NJ,NY,ALL],[f1,11,12],[f2,22,24,80,09]]
I need to replace some of the elements of this vector with new value.
For ex.
I need to replace
[flag,0,1,1] to [flag,false,true,true]
and
[state ,NJ,NY,ALL] to [state,newjersey,newyork,ALL]
so that the final vector should be like
[[flag,false,true,true], [state,newjersey,newyork,ALL] ,[f1,11,12],[f2,22,24,80,09]]
What changes should I make to following code:
can I use SetElementAt()
for (int i = 0; i < VMaster.size(); ++i) {
Vector subVect = (Vector) VMaster.elementAt(i);
String field1 = (String) subVect.elementAt(0);
for (int j = 0; j < subVect.size() - 1; ++j) {
if(field.equals("flag"))
{���.
����.
}
Thanks,
ag