CJCoding With Joseph

Read the Exception Message

The try block throws new InvalidOperationException("operation not allowed"). Catch it and print the exception's Message property, which should print exactly operation not allowed. Use top-level statements with try/catch. This program reads no input.

The program always prints: operation not allowed

Expected Output:

operation not allowed
Topics:
Exceptions
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.