I have list with different brackets:[,],{,},(,)
I need to merge them into double brackets
for (int i = 0; i < word.size(); i++) {
        if (word.get(i).equals("("){
            word.set(i,"()");
        }
        if (word.get(i).equals("{"){
            word.set(i,"{}");
        }
        if (word.get(i).equals("["){
            word.set(i,"[]");
        }`
It works, but it remove some brackets. If before this there are like 107963, now it's 107952
 
    