code: private static boolean checkCriticalValue(double score, int n1, int n2, double aLevel) {
              boolean rejected=false;
  
              int n=n1+n2;
  
              if(n1<=20 && n2<=20 && aLevel==0.05) { //This works only if we have low values on n1 and n2 and for specific levels of a
                  int key1=Math.max(n1,n2); //put the maximum in the first key (this is due to the way the table is contructed)
                  int key2=Math.min(n1,n2); //put the minimum in the second key
  
                  Object value = CRITICAL_VALUES.get2d(key1, key2);
                  if(value!=null) { //check if we have the value in the table
  
                      String[] lowuplimit=String.valueOf(value).split(",");
  
                      int low = Integer.parseInt(lowuplimit[0]);
                      int high = n;
                      if(lowuplimit.length==2) {
                          high = Integer.parseInt(lowuplimit[1]);
                      }
  
                      if(score<=low || score>=high) { //if the score is outside the confidence intervals reject null hypothesis
                          rejected=true;
                      }
  
                      return rejected;
                  }
              }
  
  
              //Estimate the mean and Variance under Null Hypothesis
              double mean= 2.0*n1*n2/((double)n1+n2) +1.0;
              double variance = 2.0*n1*n2*(2.0*n1*n2 - n1 - n2)/(n*n*(n-1.0));
  
              //Normalize U
              double z=(score-mean)/Math.sqrt(variance);
  
              //Get its pvalue
              double pvalue=ContinuousDistributions.gaussCdf(z);
  
              double a=aLevel/2; //always tailed test, so split the statistical significance in half
              if(pvalue<=a || pvalue>=(1-a)) {
                      rejected=true; 
              }
  
              return rejected;
      }
docs: Checks the Critical Value to determine if the Hypothesis should be rejected.
  
  @param score
  @param n1
  @param n2
  @param aLevel
  @return