// "Apply conversion '.toArray(new int[0][])'" "true-preview" import java.util.*; class Array { static int[][] foo() { Set set = new HashSet<>(); set.add(new int[]{1, 2}); int[][] arr = set; return arr; } }