how to drop object reference in java?

Assign the special value null to the reference variable.

For more info - tutorial.

var=null;

I dont think it will drop the refference, it will create garbage.. First let us know what you require..?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.