What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-25 13:03:13
throw and throws keyword in java
public void doChangePin(int oldPin, int pin) throws Exception { //need to add throws followed by exception name if (oldPin == pinCode) { pinCode = pin; } else { throw new Exception("some message"); //throwing the exception by creating ... Add solution