0

I want to update a particular column in csv if the condition is met. For example

 engineer,i
 doctor,i

is the csv file,once the row is visited i want to change the "i" value to "v"

for(String line1 :lines)
{
    String[] array1 = line1.split(",");
    if(array1[1]=="v")
    {
        continue;
    }
    else
    {
        double distance = compute(array[0], array1[0]);
        if(distance>0.8)
        {
            lines1.add(line1);
            array1[1]="v"; //why this line doesnot update that column
        }
    }
}

so how to update or replace a value in csv file???

Waleed Iqbal
  • 1,308
  • 19
  • 35
SHALINI
  • 11
  • 4

0 Answers0