CJCoding With Joseph
15free / daySign inCreate account

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

= newline. The output ends with a newline, so print one after the last line.

Hints2 available
Topics
Exceptions
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.