• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About DateFormat from K&B

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! This code



on my machine produces this output:

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


which is different from

9/8/01 7:46 PM
Sep 8, 2001
9/8/01
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
 
Ranch Hand
Posts: 159
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no.
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.

regards,
Mark
 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !!!
 
Andry Dub
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much. Now i do not worry about this!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic