Chapter 4Handling Exceptions
- Fill in the blanks: The ___________________ keyword is used in method declarations, whereas the ___________________ keyword is used to send an exception to the surrounding process.
throwing
,catch
throws
,throw
catch
,throw
throws
,catch
throw
,throws
catch
,throwing
- What is the output of the following application?
package paper;
import java.io.Closeable;
public class PrintCompany {
class Printer implements Closeable { // r1
public void print() {
System.out.println("This just in!");
} ...
Get OCP Oracle Certified Professional Java SE 17 Developer Practice Tests now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.