Passing array to an object in java
Posted on 2007-09-28
I have an array of data type Troop in java . This array can be empty or may hold multiple values. IF it has any values i need to pass it to an addTz object otherwise it should be ignored if this array is empty or null.
initially the values are stored in a comma separated straing as String a="abc,def,hey,"
I need to convert these into and array and then pass it to addTz.setvalues(a) or something like that.
How do I do it?