1. What does the static keyword mean? What is the difference between a static field and an instance field?
2. The garbage collector won't collect an object if there is a live reference to it. Which line would keep a reference to the object alive?
Kaydell Leavitt wrote:I don't know why K&B makes such a big deal about saving objects from GC. I can't think of any practical reason to save an object from GC.
You're right about that. However a large number of questions in those certification exams are about things which no sane programmer would ever do. Follow this forum for a while and you'll see what I mean. (Although I haven't seen "i = i++" for a while.) But since Java lets you do those things, and the tests are supposed to be comprehensive, they have to be covered by the tests.