jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes DateFormat 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 "DateFormat" Watch "DateFormat" New topic


Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661

Can some one explain what's happening in the last line of the code.


df is accessing the contents of the array and formattting it( I think)
But what is the use of d1 being passed into the format method.

I am finding this Chapter really boring.Wonder if I am the only one..
What exactly are we supposed to know in it.

The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1323

Originally posted by Nabila Mohammad:
But what is the use of d1 being passed into the format method.

because for apply different date format you need to passed date Object.
see JavaDocs format method of DateFormatclass.

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
I agree. Here's the link: http://aspose.com/file-tools
subject: DateFormat
It's not a secret anymore!