The two cases are the similar with one minor difference. In the first case, you assign the object to a reference variable, which presumably, will be used to access the object again later. In the second case, you are done with the object. It will be eligible for GC upon return.