You'll have to check the language specifications, if indeed this really is a language issue. I'm not sure where JVM operation is mandated. However, choice A is poorly-worded to begin with. I would agree that C is the only answer. You can't really depend on the JVM doing anything at a precise time when it comes to garbage collection. What constitutes "low memory"? Who knows. A JVM could just as easily let all the memory run out before doing its garbage collection. It could just as easily have it always running so there never is a "low memory" issue. Beats me. If this was an actual exam. My answer: C. (Unless it said "choose 2 answers.") Bad question.
Hai friends, I agree with the answers both A and C. b'coz Garbage Collection thread is always running as a low priority thread. so, whenever the memory problem arises, the JVM makes the GC thread as a high priority thread. It is up to the JVM, to find the memory problem and call the GC thread. Hope I am correct. :roll:
Hi, ----------------------------------------------------------- GC may be implemented differently by different compilers. ----------------------------------------------------------- Is n't GC implemented in JVM rather than compiler ? I thought GC is a run-time issue...
Originally posted by fred rosenberger: I don't know that 'c' is correct either. the OBJECT doesn't allocate memory, the JVM does.
Splitting hairs, there, Fred. It should probably read "memory allocated for the object" rather than "by the object." Regardless, I think it's safe to say that C is a correct answer. It's difficult to say that A is a correct answer because you never really know for sure what the JVM is going to do with garbage collection. In theory, the garbage collection thread should run when you get low on memory, but you don't know for certain that it will. Corey
Isn't the whole point of this exam to split hairs? I'm not trying to be an a** or anything, but the statement is wrong. As soon as you start saying "well, they MEANT this when they wrote THAT", you might as well throw out the whole test. but of the above choices, i would proabably pick C, if i am forced to pick anything.
Joined: Dec 20, 2001
Originally posted by fred rosenberger: Isn't the whole point of this exam to split hairs?
It is, but you must remember that, unlike the folks at Sun that ponder over every last word in the question (and are paid to do so), most folks that come up with mock exams don't do so. Therefore, sometimes you just have to take mock exam questions with a grain of salt. If this were an actual question from the Sun exam, I'd definitely split hairs with the best of 'em. However, sometimes I find it best to keep in mind the source of the question. Whoever wrote this was probably trying to help others get certified - anyone that does that means well, but doesn't always get it perfect. Corey [ March 30, 2004: Message edited by: Corey McGlone ]
Point taken. My apologies to anyone who thought I went over the line.
Joined: Dec 20, 2001
Originally posted by fred rosenberger: My apologies to anyone who thought I went over the line.
I don't think any apologies are required, Fred. It's just that I've been around for a while and, if you spend your times splitting hairs over mock exams, you're quickly going to go bald. That said, there are still times at which I think it's good to split hairs. :roll: For example, if this had been spotted in a well-known SCJP prep book (M&R or K&B, for example), I'd certainly take up the point of splitting hairs. Corey
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