Multiple Choice Question

Quiz Guidelines

 

QID: 
518
Question: 

Assume that a method named 'method1' contains code which may raise a non-runtime (checked) Exception. What is the correct way to declare that method so that it indicates that it expects the caller to handle that exception?

Select 2 options

A. public void method1() throws Throwable
B. public void method1() throw Exception
C. public void method1() throw new Exception
D. public void method1() throws Exception
E. public void method1()

Q&A Set: