Home » JAVA Programming » Interfaces » Question
  1. What is the difference between AutoCloseable and Closeable?
    1. Closeable throws Exception; AutoCloseable throws IOException
    2. Closeable is a concept; AutoCloseable is an implementation
    3. Closeable throws IOException; AutoCloseable throws Exception
    4. Closeable is an interface and AutoCloseable is a concrete class
    5. None of these
Correct Option: C

Closeable extends AutoCloseable and both are interfaces. Closeable throws IOException and AutoCloseable throws Exception.



Your comments will be displayed only after manual approval.