Elance Exams Answers PDF file

-- PDF FILE --
Download PDF file of elance Zoho Creator Exam Answers

You have the following method, which throws an unchecked exception public boolean testArg(Integer n) throws IllegalArgumentException { if (n == null) throw new IllegalArgumentException(); /* ... */ } Is this throw specification correct?

No, you never specify exceptions in Java.
Yes. You need not specify an unchecked exception, but you are allowed to do so.
Yes, you must specify all exceptions thrown by a method, checked and unchecked.
No, it gives a compile error, because you are not allowed to specify an unchecked exception.
  • Follows us our servcies
  • Facebook icon
  • Linkedin icon
  • twitter icon
  • rss icon
  • social icon