Write an expression whose value is a reference to a newly created Exception object whose message is “out of oil”.

Write an expression whose value is a reference to a newly created Exception object whose message is “out of oil”.

LANGUAGE: JAVA

CHALLENGE:

Write an expression whose value is a reference to a newly created Exception object whose message is “out of oil”.

SOLUTION:


new Exception("out of oil")

Add comment