Java Exception에 변수 추가하기
class SpecialValueException extends Exception { private final int specialValue; public SpecialValueException(String message, int specialValue) { super(message); this.specialValue = specialValue; } public int getSpecialValue() { return specialValue; }}public class CustomExceptionExample { public static void main(String[] args) { try { proce..
2024.11.30