code: public static boolean isMasterCard(String cc) {
          int firstdig = Integer.parseInt(cc.substring(0, 1));
          int seconddig = Integer.parseInt(cc.substring(1, 2));
  
          if ((cc.length() == 16) && (firstdig == 5) && ((seconddig >= 1) && (seconddig <= 5)))
              return isCreditCard(cc);
          return false;
  
      }
docs: Checks to see if the cc number is a valid Master Card number
  
  @param cc a string representing a credit card number; Sample number: 5500 0000 0000 0004(16 digits)
  @return true, if the credit card number is a valid MasterCard  number, false otherwise