#5 Uses of try with resource

# The resources are now using try with resources
# Refactoring to better legibility
Merge pull request #7 from efraimgentil/master

#5 Uses of try with resource