Write a statement that throws a newly created Exception object whose message is “does not compute”.

Write a statement that throws a newly created Exception object whose message is “does not compute”.

LANGUAGE: JAVA

CHALLENGE:

Write a statement that throws a newly created Exception object whose message is “does not compute”.

SOLUTION:


throw new Exception("does not compute");

Add comment