A

Admin • 828.03K Points
Coach

Q. Which is the correct syntax to define a method that throws IOException?

  • (A) void method() throw IOException {}
  • (B) void method() throws IOException {}
  • (C) throws IOException void method() {}
  • (D) throw IOException void method() {}

Explanation by: Admin
Correct syntax is `throws IOException` after method signature.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.