0
What is java custom exception ???
Give me simple short cut example and code
2 Respostas
+ 5
Radha krishna Matta
Plz use search bar and read this before asking any questions..
https://code.sololearn.com/W0uW3Wks8UBk/?ref=app
Quick quide...
A custom exception in Java is a user-defined exception that extends the Exception class or one of its subclasses. It allows you to create your own exception types that can be thrown and caught in your code.
Here's a simple example of a custom exception in Java:
'''
public class MyException extends Exception {
public MyException(String message) {
super(message);
}
}
'''
for more...
https://www.javatpoint.com/custom-exception
hope it's helpful...happy learning👍.