File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Isolating a reference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Isolating a reference" Watch "Isolating a reference" New topic

Isolating a reference

Chitta Ranjan Mahato
Ranch Hand

Joined: Jun 20, 2009
Posts: 38

Thanks in advance
Paul Beckett
Ranch Hand

Joined: Jun 14, 2008
Posts: 96
looks like an example of islands of isolation.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20271

If you consider a reference as a bridge to the island, you first create three bridges from main to the three islands. You then build a bridge from the island named i2 to the island named i3, from i3 to i4 and from i4 to i2. Each island now has three bridges coming in: one from main and one from one of the other islands.

If you then assign null to your references, you break down the bridges from main. The islands cannot be reached from main anymore, but they still have bridges between each other. That's what's called an island of isolation as Paul has said.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Isolating a reference
It's not a secret anymore!