SCJP2. Please Indent your code using UBB Code
Originally posted by Anna Swartz:
When the program reaches line 8, how many of the String objects created in line 5 , are eligible for garbage collection?
I do not understand this explanation, we cannot refer to tmp after line 8. Then why does it still have a reference, and when will it loose it?
Co-Author of Head First Design Patterns
Just a Jini girl living in a J2EE world.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Co-Author of Head First Design Patterns
Just a Jini girl living in a J2EE world.
Alfred Raouf - Egypt - SCJP 1.4<br />Kemety.equals(Egyptian) // returns true
Originally posted by Alfred Kemety:
Kathy, I really wonder whether Sun is testing our knowledge of the Java concepts and specifications or if we are totally awake during the exam, I mean what's the point behind having tricky questions that take your attention away from the real objective the question is about and make you look at something else?
Co-Author of Head First Design Patterns
Just a Jini girl living in a J2EE world.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
The "tricky" questions though, in many cases DO show code that, as I've said before, you would fire someone for writing. However, this experience will come in handy when you work for someone and your job is to fix the code written by the worst Java programmer in the universe.
How do they get the deer to cross at the signs? Or to read this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|