In the FakeConnection class, implement the AutoCloseable interface so that FakeConnection objects can be used in try-with-resources blocks. The close() method should display the phrase "Closing database connection..." In the try block, call the usefulOperation() method and then the unsupportedOpera
AutoCloseable and try-with-resources
You must be signed in to leave a comment
9 June 2020, 23:01
Great explanation! Thank you!!!