public int validarCadena(String cadena){
        int cont=0;
        cadena=cadena.toUpperCase();
        if(cadena.isEmpty())return 0;
        else{
            for(int i=0;i<cadena.length();i++){
                if(cadena.charAt(i)>= 'A'&& cadena.charAt(i)<= 'Z' ||cadena.charAt(i)==' '||cadena.charAt(i)>='0'&& cadena.charAt(i)<='9')
                    cont++;
            }
        }
        if(cont==cadena.length())
            return 1;
        else return -1;
    }