I am trying to pass a String of "A" to a constructor. The problem I am running into is the instance variable that has to be set isn't filled with anything. Now I am trying something different than I ussually do. As soon as I try anything with the array variable it gives a NPE. So how to fix this and avoid it in the future. Thanks!
public Array(String x){
        if(x == "A" ){
            array = { { 1, 1 }, { 1, 1 }, { 1, 1 } };
        }
        if(x == "B"){
            array = { { 2, 2 }, { 2, 2 }, { 2, 2 } }; 
        } 
        if(x == "C"){
            array = { { 3, 3 }, { 3, 3 }, { 3, 3 } };
        }
    }
 
     
     
    