单项选择题

Whatallowstheprogrammertodestroyanobjectx?()

A.x.delete()
B.x.finalize()
C.Runtime.getRuntime().gc()
D.Explicitlysettingtheobject’sreferencetonull.
E.Ensuringtherearenoreferencestotheobject.
F.Onlythegarbagecollectionsystemcandestroyanobject.
微信扫码免费搜题