<B>~James Baud</B><P>He who asks, is a fool for five minutes;<BR>but, he who does not ask, remains a fool forever. (Chinese proverb)
Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
Senior Software Engineer, IBM
author of: Practical Java
Originally posted by Mark Herschberg:
Some types of casting isn't avoidable, such as castig to meed method signatures. A common example is storing items in vectors. Everytime you get an item from a vector, it comes back as an Object. You may then need to downcast it. If you find yourself doing this often, ask youself if a vector is really the only option. Maybe an array or other data structure is a better option.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Originally posted by Rob Acraman:
Is there any difference in cost between checking for checked vs. unchecked exceptions?
Senior Software Engineer, IBM
author of: Practical Java
Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0672324261/ref=jranch-20" target="_blank" rel="nofollow">Ant Developer's Handbook</a>
Originally posted by Marius Holm:
1) How do you track Object creation/deletion, garbage collection and other memory/resource allocating processes?
From some of the messages around it seems that programmers that seem to be more into this than I am, have difficulties with controlling (keeping track of) Object instances throughout program execution. Now, in my simple world, the general solution to this is to do nothing, as the gc eats it all when all refs/the last ref to that Object has a null value. (Similarly, when that Object is handled by the gc, all the refs that the Object itself contains, are set to null, or deleted, and the intances these point to are handled (that means deleted, right?) by the gc as well). I can understand that in some cases, when you want to reuse that variable/pointer dynamically in your code and it sometimes is assigned to a new Object, and sometimes not, that things may become somewhat more complicated but still... Well, anyway, are there some system functions that you can use during debugging for instance, that will report your Object/resource allocation during program flow?
2) What is a checked vs. an unchecked Exception?
I see one guy asks about differences between checked vs. unchecked Exceptions, and he even gets an answer on this. I didn't know there existed such a term. Anyone care to tell me what it is?
[/B]
Marius Holm wrote:
How do you track Object creation/deletion, garbage collection and other memory/resource allocating processes?
Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
Senior Software Engineer, IBM
author of: Practical Java
Senior Software Engineer, IBM
author of: Practical Java
Suneel
Senior Software Engineer, IBM
author of: Practical Java
Suneel