Dawn Charangat wrote:.. but then the question was to differenciate between only two of those scenarios... and hence the reply
As JavaRanch is a learning site, it's important to realize that there's more to an answer sometimes than just the answer to the specific question a poster might ask.