Am I reading the following input correctly?

Here is my code so far:

```
    while ((line = br.readLine()) != null) {
        line = line.substring(line.indexOf('[')+1, line.indexOf(']'));
        String[] parts = line.split(",");

        for (int i = 0; i< parts.length; i++) {                               
            rangeNo[i]= Integer.parseInt(parts[i]);

            System.out.println("{" + rangeNo[i] + "}"); 
    }
  }

```

and this is my input

```
 [2,9], [3,11]

```

Also, when I try to print the value of rangeNo[3] it return 0 instead of 3

can someone help me out with this?