wood burning stoves
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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: 1321

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
subject: DateFormat