public String validar(String usr, String cont){
        try{
            ConexionBD con = new ConexionBD();
            Connection conex = con.conectar();
            Statement stmt = conex.createStatement();
            ResultSet rs = stmt.executeQuery("select * from profesor where nUsuario='"+usr+"';");
            if(rs.next()){
                String c=rs.getString("contrasenia");
                if(c.equals(cont)){
                    return "prof";
                }
                return "err";
            }
            stmt = conex.createStatement();
            rs = stmt.executeQuery("select * from estudiante where nUsuario='"+usr+"';");
            if(rs.next()){
                String c=rs.getString("contrasenia");
                if(c.equals(cont)){
                    return "est";
                }
                return "err";
            }
            stmt = conex.createStatement();
            rs = stmt.executeQuery("select * from admin where nUsuario='"+usr+"';");
            if(rs.next()){
                String c=rs.getString("contrasenia");
                if(c.equals(cont)){
                    return "admin";
                }
                return "err";
            }
        }catch(Exception e){
            
        }
        
        return "none";
    }