Varsha Dighe

Ranch Hand
+ Follow
since Oct 14, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Varsha Dighe

Bill,
First I thought of writing to you, but then I just wanted to make sure my understanding was correct before sending it to you as an error. I also knew you quite often visit this forum. Probably, I should have searched for the topic in the previous posts... believe me I hate to swamp this forum with questions repeatedly if they have been discussed already.
Bill/Peter
If such type of question comes in the exam, should we base our answer keeping "dump" JVM in mind or "intelligent" JVM in mind ?
Thanks for your help
varsha
Thanks a lot.. I thought my fundamentals have gotten wrong.. I am delighted that my answer was correct as felt by other people on this forum.
-Varsha
William Brogdens Exam Cram Q7 on GC
It on page 163 and goes like this
Q:Here is a method that creates a number of String objects in the course of printing a countdown sequence.

1. public void countDown() {
2. for(int i = 10; i >= 0; i--) {
3. String tmp = Integer.toString(i);
4. System.out.println(tmp);
5. }
6. System.out.println("Boom!");
7. }

When the program reaches line 6, how many of the String objects created in line 3 are eligible for garbage collection? (Assum that the System.out object is not keeping a reference.)
Answers
a - None
b - 1
c. 10
d. 11
Correct answer is c (as per William). I was thinking d was correct because the variable tmp which is a local variable also goes out of scope when the program reaches line 6 does'nt it ? ..which would add 1 to the objects eligible for gc after line 6 i.e 11 objects
Any help will be appreciated

Varsha Nachane

[This message has been edited by Varsha Dighe (edited February 16, 2001).]
Are you looking for some thing animated or static ... or you do not care ?
Varsha
Congratulation Elena !!

Originally posted by Elena Balland:
Thank you for reply, Varsha. I have not received reply yesterday when I was nervous reading all that I could find on Internet about threads before today's exam. I passed it from the second attempt. If I had the same exam in December I would pass for sure. The questions are twice less complicated than they were before, also they avoided put 4-6 questions in one. Of course, increased duration give you possibility to think, not ony to click.
If you made mock exams, study Complete Java 2 Certification of Simon Roberts, Philip Heller,Michael Ernest ( which is very good , but have a lot of mistypings) you will pass exam. With this exam as with the previous one I have also impression of incorrect wording and answers about which I notified Sun.


Is there a website which has questions on Threads ? I would like to test my Threads knowledge
Any help is appreciated
Varsha
Bill,
Are you suggesting that finalize() method on an object can run after the object is garbage collected ?
Any help is appreciated
Varsha
Thanks Bill, for clearing it out
Following code do not compile

butif I compile the following code

It compile and prints 10.
I am confused with the fact that in both the cases, the if statement is true, even then only the second example compiles
Any help will be appreciated
Varsha Dighe
Oops!! (No pun intended )
Thanks
Varsha
Hello,
I am trying to compile the following code but gives me an error , which says
Method setsize() not found in class HelloFrame.
The code is as follows

Thanks
Varsha