No, you cannot guarantee the garbage collection, though you can make a request using System.gc() or Runtime.gc() method.