간단한 채팅 응용 프로그램을 구축하고 있는데 JOptionPane을 통해 서버 주소와 포트를 설정하려고합니다. 사용자가 포트 번호를 설정할 때 문자를 입력하지 않았는지 확인하고,JOptionPane InputMismatchException
int port=Integer.parseInt(JOptionPane.showInputDialog("Please insert the default port!");
나는 try/catch 블록으로 처리하려고했으나 아무런 제안이 없었습니까?
"try/catch 블록으로 처리하려했지만 작동하지 않았습니다"라는 의미는 무엇입니까? – BackSlash
'try {code} catch (inputmismatchexception) {}'@BackSlash – xhulio
그리고 작동하지 않는 것은 무엇입니까? – BackSlash