robert stannard

Ranch Hand
+ Follow
since Jun 02, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by robert stannard

yes I've just been looking for it too and couldnt find it....so any news on its whereabouts would be most helpful. Thanks.
Congrats on passin your exam Alim.

I am looking into preparing for this exam and your comments are helpful. Could you please advise how long I should allow to prepare full-time/part-time?

Regards
Robert.
Thanks Jonathan for your comments, they're very useful. I do want to make sure I'm working on relevant material for the commercial world. I guess both would be the ideal.

Do you have any ideas roughly how much time I should plan for the preparation? Would you say its more or less than the SCJP 1.5?

Regards
Robert.
Dear Ranchers,

I recently completed SCJP 1.5 and am now considering the next certification to prepare for. Could someone please advise which would be the best next certification to take? I am considering SCWCD or SCBCD. Also how long (full-time) approximately should I plan for each of the two exams?

Regards
Robert.
Could someone please tell me about the logo?

Is this something you can add to your resume if you are SCJP?
Where do you get this from?
How does the process work?

Regards
Robert.
16 years ago
Thank you to everyone for your good wishes. Good luck to you all.

Regards
Robert.
16 years ago
Dear Ranchers,

I took my exam today and passed, its amazing, I failed all my mock exams, even the mock I took yesterday ! I only scored 35 correct (pass was 43!). So its a big surprise to me and very good news.

I would like to share my preparation experience with the community, maybe it can give you some ideas.

I have spent 3-months preparing full-time. I know this is quite a long time - but I was starting from a lowish base in that I have never used Java in great depth before and also I think I could have saved alot of time as I will mention in my later point.

1. I spent 1-month reading through the K&B. I was aiming to cover 30-pages a day including review sections and self-test. I didn't quite manage this schedule and so I think I took 5 or 6 weeks to go through the book.
2. I then spent 2-weeks re-reading all of the end-of-chapter self-tests again.
3. I took the mock exams in the K&B and reviewed them - 1 week - I failed both of these !
4. I then read some posts here about Whizlabs and looked into this. I decided to buy the product it costs GBP 25 and you can download it directly from the web. I really think its a great tool for helping with the preparation. I would recommend turning-off the timer and to go through all the questions in a test and then review the answers.
It comes with 7-tests in total, 1- diagnostic test, 5-practice tests and 1 exam test. The questions in all the tests are of a very high standard and perhaps even a bit more difficult then the real exam, but it really covers the complete syllabus and a bit more.
5. I took 4-Whizlab tests, the last one was yesterday and I failed them all ! but I reviewed all my questions and the answers carefully and made notes on Index cards as recommended in K&B. Slowly I could feel more and more information starting to stick in my mind. I spent on average between 3-4 hours per day studying (occassionally more / some days less) so it was very hard work for quite a while.
6. Because I was failing all my mocks, I decided to save 3 of the exams in Whizlabs until after I took the the exam today. My plan was to take the exam today (expecting to fail) just for the experience, then review the remaining 3 Whizlab exams and then re-sit the exam in 2 weeks time. Because I had a special offer voucher from Sun where I could re-take the exam for free I could think this way. Surprisingly I passed today so that it wont be necessary. I scored 69% and I'm sure if I had done the other practice exams I could have scored even higher, in quite a few topics I was scoring 70-80% unfortunately Concurrency 50% and Scoping 58% pulled me down a bit.
7. My biggest mistake in my preparation was using Eclipse. I read a post here just last week where many people (including Bates) were strongly recommending to prepare without an IDE, and thats what I should have done from the start. I think I could have picked up and remembered the concepts alot quicker if I had done that. I really think Bates should mention this in the books and also it should be point number 1 in the FAQs etc.

So to summarize the steps,
1. read through K&B and do end of chapter questions (approx. 5-weeks)
2. review all the end of chapter self-test questions again (approx 2-weeks)
3. do K&B mock exams and review (approx 1.5 weeks)
4. buy Whizlabs and do mock exams and review and make notes on Index cards (2-weeks)
5. DONT USE AN IDE !! I used Textpad for the past week and it really helped alot.

Good luck and thanks for your help here.

Robert.
16 years ago


originally posted by Ashish Hareet
Form the java docs(note: referring 1.5, do check with others) for the 'b' it states 'If the argument arg is null, then the result is "false". If arg is a boolean or Boolean, then the result is the string returned by String.valueOf(). Otherwise, the result is "true".'

You can read more about this here - http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html#syntax
scroll a little down to "Conversions"



Hi Ashish,

from the link you sent me I found this quote from the page,


'b', 'B' general If the argument arg is null, then the result is "false". If arg is a boolean or Boolean, then the result is the string returned by String.valueOf(). Otherwise, the result is "true".



but if you compare this description with that from the API docs for Boolean(String) you find


public Boolean(String s)
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true". Otherwise, allocate a Boolean object representing the value false.



I think that these two modes of operation are contradictory.

Regards
Robert.
[ June 21, 2008: Message edited by: robert stannard ]
Hi Ashish,

thanks for your comments and the link. I read there that the "+" (additive) operator is evaluated before the "==" (equality) operator.

When I see,
System.out.println("hi" + s1==s2);
then just by the layout of the statement I would think its evaluated as its shown,
"hi" + (s1==s2)
and not
("hi" + s1) == s2.

Also on a related note why is,

new Boolean("anything in here") = false BUT
System.out.printf("%b", "anything in here") = true ?!

Regards
Robert.

[ June 18, 2008: Message edited by: robert stannard ]
[ June 18, 2008: Message edited by: robert stannard ]
Hi Kris,

thanks for your explanation, it makes perfect sense. I changed the Println statement to,

System.out.println("hi" + s==s1);

and this still gives false. Any ideas why?

If I change <System.out.println("hi" + s==s1);> to
System.out.println("hi" + (s==s1));

then I get the output "hitrue"
and if I change the <System.out.println("hi" + s==s1);> to
System.out.println(("hi" + s)==s1);
then I get output "false".

could it be that the + is being evaluated before the "==", is this correct? does it make sense?

Regards
Robert.
[ June 18, 2008: Message edited by: robert stannard ]
Hi Ashish / Marc / Krishnamoorthy,

you're all right, I made a typo, the output should be false / false but I still dont understand why it works at all.

I was expecting to see "hifalse" on the output. Why does the JVM treat a String ("hi") as a boolean and not as a String? I thought the rule for concatenating Strings in a Println was that if the first item was a String then the other items would be concatenated otherwise if the first and subsequence items were non-Strings then it would try and apply addition logic to those items.

Regards
Robert.

[ June 18, 2008: Message edited by: robert stannard ]
[ June 18, 2008: Message edited by: robert stannard ]
Dear Ranchers, can someone please explain to me how LINE1/LINE2 can work? I dont understand why (or how) it works. Im getting discombobulated.
Regards
Robert.


Output:
true // this is a typo from the original question
true // and should be amended to false/false

[ June 18, 2008: Message edited by: robert stannard ]
Hi Taariq,

Thank you thats excellent. I tried both your solutions and they both worked perfectly.
Whats a confusing for me is that your solutions can only work by adding in the "Thread.sleep(1000);" line. I guess this is to ensure that that the notifyAll() doesnt run before the wait() has had a chance to secure a lock on that object?

Regards
Robert.
Hi Ranchers, can you please help me with this question. The program just prints "trying to notify" but it doesn't tell the "wait()" thread in "run()" method to continue and so it doesn't print "notified".
Apparently the reason is that the thread which issues the "NotifyAll" doesnt own the lock on the same thread that the Wait() is holding.
Do you know how I can modify the synchronize statement in "startme()" so that it also owns a lock on the wait() thread and so will allow that thread to continue?

Thanks Jesper thats a good answer, I understand it now.

Regards
Robert.