Start here. This is the direct spoken answer to practice first.
Overview
Garbage collection manages memory reachability; try-with-resources manages deterministic release of resources such as files, sockets, and database handles.
A try-with-resources statement owns one or more objects that implement AutoCloseable. Java closes those resources automatically when control leaves the block, whether the body succeeds or throws. Multiple resources are closed in reverse order of declaration. This prevents cleanup from being skipped on an early return or exception. It is different from garbage collection: a resource may hold a file descriptor, socket, or pooled database connection that must be released promptly even though its Java object is still reachable or has not been collected.