Dear all,
I have following code and i want to write elements of array in single string(merge with ,) , in between all the values.
like
a[0] = "hi"
a[1] = "hello"
a[2] = 1
a[0] = "get"
a[1] = "post"
a[2] = 2
a[3] = 45
then i want output like
String str;
str = hi,hello,1
str = get,post,2,45
and so on.
I have do so far is.I am taking value from hashmap having name temp.
for(Map.Entry<Integer, String[]> mapEntry2 : temp.entrySet())
{
int key3 = mapEntry2.getKey();
//System.out.print("\nvalue of key3 = "+key3);
String[] aa5 = (String[]) temp.get(key3);
for(int g=0;g<aa5.length;g++)
{
}
}
So what i have to write at inside for loop to create and store it with .csv file
each key contains all elements of one line.
Thanks