I want to save two Strings in a 2D String Array and further use it for other methods. 

**My Array:**

```
String[][] x = {{"Iron Ice Tea", "5"}, {"Clock Clock", "3"}, {"Shoe Telephone", "3"}};

```

**My method:**

```
  public static String getInsertedCustomerOrder(String[][] input) {
        String query = "";
        int x = 0;

    for (String[] product : input) {
        for (String count : product) {
            if (x == 0) {
            query = query + "((SELECT PRICE FROM PRODUCT WHERE NAME = '" + product + "') * " + count + " + ";
            } else {
            query = query + "(SELECT PRICE FROM PRODUCT WHERE NAME = '" + product + "') * " + count + " + ";
            }
            x++;
        }
    }

    if (query != null && query.length() > 0 && query.charAt(query.length() - 2) == '+') {
        query = query.substring(0, query.length() - 2);
    }

    query = query + ")";

    return query;
}

```

The output is: 

`((SELECT PRICE FROM PRODUCT WHERE NAME = '[Ljava.lang.String;@1db9742') * Iron Ice Tea + (SELECT PRICE FROM PRODUCT WHERE NAME = '[Ljava.lang.String;@1db9742') * 5 + (SELECT PRICE FROM PRODUCT WHERE NAME = '[Ljava.lang.String;@106d69c') * Clock Clock + (SELECT PRICE FROM PRODUCT WHERE NAME = '[Ljava.lang.String;@106d69c') * 3 + (SELECT PRICE FROM PRODUCT WHERE NAME = '[Ljava.lang.String;@52e922') * Shoe Telephone + (SELECT PRICE FROM PRODUCT WHERE NAME = '[Ljava.lang.String;@52e922') * 3 )`

Whereas it should be: 

```
((SELECT PRICE FROM PRODUCT WHERE NAME = 'Iron Ice Tea') * 5))

```