I have a 2d Boolean array and I want to dynamically create it's size based on the input coming in. For example: I have this string as the input "0-1 0-2 1-2 1-3 2-3". I split it on the dash and parsed it to an int. All those coordinates are positions in the Boolean array. When I initialize the array below for this example it works. But how could I initialize it dynamically in case the input changes?
myArray = new boolean [4][4];