How to use try-with-resources when api is below 19

Android Studio 3.0 and later, as stated on the https://developer.android.com.
official website, also extend support for try-with-resources to all levels of Android API.

Why do you require api 19 when you use it in android studio?

Mar.22,2021

try-with-resources is the new syntax of java 7, which requires java 7 or above to use

.
Menu