143k views
3 votes
When using the throw statement, if you don't pass a message to the exception object's constructor, then ________.

User Stoyan
by
5.7k points

1 Answer

2 votes

Answer:

it will be null message

Step-by-step explanation:

The throw statement throws a user-defined exception. The current function will stop that is the statements after throw won't be executed, and the message will be passed to the exception object's constructor.

When using the throw statement, if you don't pass a message to the exception object's constructor, then it will be null message.

User R KiranKumar
by
6.6k points