You can call a constructor twice, if it is overloaded. This is how you might do it with a Clock, which is more-or-less the same as an example in the Deitel and Deitel books.Flesh out that class, set up a class with a main method, and try it out.
I hope that answers your question. If you use the keyword this with () like that, it must be the first statement in the constructor.
As far as I know you cannot invoke a constructor on an already-extant object, as you seem to be doing. Nor can you call an object "class," because "class" is a keyword.
Joined: Oct 13, 2005
myself wrote:Flesh out that class, set up a class with a main method, and try it out.
Then find my spelling errors and correct them!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com