Examveda

What is the purpose of the `try-with-resources` statement in Java?

A. To define JavaBean properties

B. To execute SQL queries

C. To automatically close resources like streams, files, or sockets

D. To create JavaBeans

Answer: Option C


This Question Belongs to Java Program >> Miscellaneous In Java

Join The Discussion

Related Questions on Miscellaneous in Java