To answer your question, there is no built in way to re-initialize an object to its original state. The easiest way would be to create a new instance and throw away (no longer reference) the original object.
And, after you make the code compilable, and take into account that you can't declare the variable twice (but can assign to it twice if you want), you should be clear about exactly what you think it will do. After all, to answer the question "Will it work as I think?" we have to know what you think, and most of us aren't mind readers.
You read his mind. Didn't you?
No doubt. Some of you are truly mind readers.
Doubts cleared. Thanks to all of you. Especially to Mr. Rahder and Mr. Newton.
New Instance/Throw Away (useful knowledge)
You don't know how much I laughed when I realized what my error was.
I understood there was an error. But I thought it was the word "ObjectX"
in front of the identifier, since I still not sure about when to put/omit it.
What's the meaning of the class name in front of the identifier?
since when we say "= new ObjectX()" we are saying what class it is.
What's the use/effect of putting/omitting the class name in front of the identifier?