Home » JAVA Programming » Interfaces » Question
  1. What is the alternative of using finally to close resource?
    1. throw Exception
    2. try block
    3. autocloseable interface to be implemented
    4. catch block
    5. None of these
Correct Option: C

Autocloseable interface provides close() method to close this resource and any other underlying resources.



Your comments will be displayed only after manual approval.