Most PHP code is not as strongly typed as code in a more "traditional" OO language like C++, C#, Java, etc. So an approach of porting PHP directly to Java is probably off on the wrong track.
Instead, try building a class to represent your data type. Start from the innermost type, which in your case seems to be a "Product". Example:
public class Product {
private int id;
private String name;
public Product(int id, String name) {
this.id = id;
this.name = name;
}
public int getId() {
return this.id;
}
public String getName() {
return this.name;
}
}
Now you need to represent what appears to be a category of products, so you can create another class to hold those. Example:
public class ProductCategory {
private String name;
private List<Product> products;
public ProductCategory(String name) {
this.name = name;
this.products = new ArrayList<Product>();
}
public String getName() {
return this.name;
}
public List<Product> getProducts() {
return this.products;
}
}
To use these classes, you might write code like this:
Product p1 = new Product(1, "P1");
Product p2 = new Product(2, "P2");
Product p3 = new Product(3, "P3");
ProductCategory c1 = new ProductCategory("C1");
// Add product to category 1
c1.getProducts().add(p1);
ProductCategory c2 = new ProductCategory("C2");
// Add products to category 2
c2.getProducts().add(p2);
c2.getProducts().add(p3);