> >Is there an any kind of checking if some object exist?
>
> An object always exists.
>
> If it would not exist, it would not be an object.
So true. However, I think the intent of the original question was "How
can I tell if my reference points to an object or not."
The correct answer to that question is:
When you have a reference, it either points to an object, or a
"magical" value called "null". So, if your reference points to null,
then it doesn't point to an object.
if (myObject != null) {
System.out.println("By the property of the converse error. myObject
exists, therefore it thinks.");
}
And for the record, "null instanceof Object" evaluates to false, but it
is a poor way to check for null.