Check out example codes for "java switch case enum". It will help you in understanding the concepts better.

Code Example 1

switch (BD.usuarioLogado.getTipoAcesso()) {
            case ALUNO:
                Aluno alunoLogado = (Aluno) BD.getUsuarioLogado().clone();
                jTextFieldNOME.setText(alunoLogado.getUsername());
                jTextFieldNOME.setEditable(false);

                jTextFieldDATANASCIMENTO.setText(alunoLogado.getDataNascimento());
                jTextFieldDATANASCIMENTO.setEditable(false);
                
                break;
            case PROFESSOR:
                Professor usuarioLogado = (Professor) BD.getUsuarioLogado().clone();
                break;
            default:
                break;
        }

Learn ReactJs, React Native from akashmittal.com