AutoCloseable and try-with-resources

  • 6
  • Locked
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
You can't complete this task, because you're not signed in.
Comments (1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
MaGaby2280
Level 41 , Guatemala City, Guatemala
9 June 2020, 23:01
Great explanation! Thank you!!!