jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes About DateFormat from K&B Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "About DateFormat from K&B" Watch "About DateFormat from K&B" New topic

About DateFormat from K&B

Andry Dub
Ranch Hand

Joined: Nov 06, 2007
Posts: 43
Hi! This code

on my machine produces this output:

09.09.01 5:46
9 Сентябрь 2001 г.
9 Сентябрь 2001 г.

which is different from

9/8/01 7:46 PM
Sep 8, 2001
Sep 8, 2001
September 8, 2001
Saturday, September 8, 2001

My question: will this play role on the exam that on my locale output is different? For example, i will check 09.09.01 5:46 while right answer is 9/8/01 7:46 PM

Java is my love
Mark Uppeteer
Ranch Hand

Joined: Mar 02, 2004
Posts: 159

don't worry, it will be clear what to chose.
My experience was that it was a fair exam that tests your knowledge of java, it doesn't try to trick you and make you lose points on unclear questions.
I said it once and I'll say it again, if you do good on K&B, you should do good (about 10% better actually) on the exam.


I know where my towel is. (SCJP 5, OCPJWCD)
[Free Quiz Tips for a fun night with friends or family] Flash games
Collins Mbianda
Ranch Hand

Joined: Aug 11, 2007
Posts: 259
When you use DateFormat.getInstance(), it will get the default Locale.
On the real exam it's very clear. There no ambiguity about the Locale
to use. Don't worry !!!
But for the exam's preparation, i will suggest you to work with US locale.

Good luck !!!

SCJP 5.0 | SCWCD 1.4
Andry Dub
Ranch Hand

Joined: Nov 06, 2007
Posts: 43
Thank you very much. Now i do not worry about this!
I agree. Here's the link: http://aspose.com/file-tools
subject: About DateFormat from K&B
It's not a secret anymore!