Card 71 / 76: What is the name of the interface that methods must implement to utilize the new try-withresources feature?
A)
AutoClose
B)
AutoCloseable
C)
There is no such feature.
Answer:
B) AutoCloseable
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
This feature is used in conjunction with the new try-with-resources feature of Java SE 7.
A and C are incorrect.
A is incorrect because there is no interface named AutoClose.
C is incorrect because the try-with-resources feature does exist with JDK 1.7.
|