Question: What is the difference between AutoCloseable and Closeable?

Options

A : Closeable is an interface and AutoCloseable is a concrete class

B : Closeable throws IOException; AutoCloseable throws Exception

C : Closeable is a concept; AutoCloseable is an implementation

D : Closeable throws Exception; AutoCloseable throws IOException

Click to view Correct Answer

Previous || Next

AutoCloseable, Closeable and Flushable Interfaces more questions

Does close() implicitly flush() the stream.

How does applet and servlet communicate?

In CGI, process starts with each request and will initiate....

What does bind() method of ServerSocket offer?

What happens if ServerSocket is not able to listen on....

What is the use of Flushable interface?

Which class provides system independent server side implementation?

Which version of java added Flushable interface?

How can we move from one desired step to another....

How to deep dive into the execution of a method....

Annotations more Online Exam Quiz

Annotations

Application Lifecycle - Ant, Maven and Jenkins

Client and Server

Debugging in Eclipse

Design Patterns

Java Beans

JDBC