[Java]printStackTrace 활용 예
■ printStackTrace 활용 예 import java.util.Scanner; class AgeInputException extends Exception {public AgeInputException() {super("유효하지 않은 나이가 입력되었습니다.");}} class NameLengthException extends Exception {String wrongName;public NameLengthException(String name) {super("잘못된 이름이 삽입되었습니다.");wrongName = name;}public void showWrongName() {System.out.println("잘못 입력된 이름 : " + wrongName);}} class PersonalInfo ..
JAVA Language
2012. 9. 12. 03:30