how can i fix string matrix index problem? : I'm trying to store name and address of persons in the form of 2d array, but when i run my it accepts less values only . For example if i give the array 2 rows and 2 columns , it accepts only 3 values.

I've tried searching on other forums , couldn't get the proper answer.
I also changed the dimension values but it gives wrong result only.

```import java.util.*;
```class findme{
```public static void main(String args[]){
```Scanner scan=new Scanner(System.in);
```System.out.print("enter the number of person: ");
```int per=scan.nextInt();
```System.out.print("enter the number of address: ");
```int addr=scan.nextInt();
```String addrs[][]=new String[per][addr];
```for(int i=0;i<per;i++){
```for(int j=0;j<addr;j++){
```addrs[i][j]=scan.nextLine();
```}
```}
```}
```}