Try with resources

Coding style: try should be followed by a space