많은 'if else'문을보다 깔끔한 방법으로 변환 이 질문에는 이미 답변이 있습니다. Java 15 답변 의 긴 if 문 목록 내 코드 mimeType 는가 어떤 MIME 유형과 같은지 감지합니다.있는 경우 특정 변환을 수행합니다. public void convertToMp3(File src, File target,String mimeType){ if(mimeType.equals("audio/mpeg")){ ... }else if(mimeType.equals("audio/wav")){ mp3ToWav(); }else if(mimeType.equals("audio/ogg")){ ... }else if(...){ ... //More if and else here } 다른 if 문 이 많기 때문에 코드를 줄..