aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Regarding Date Class 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 "Regarding Date Class" Watch "Regarding Date Class" New topic
Author

Regarding Date Class

Mohan Vinukonda
Ranch Hand

Joined: Jul 28, 2005
Posts: 32
Hi Friends,
I am new to JAVA, now I am going through it.
What is the difference between java.util.Date() and java.sql.Date()
I want particular senario on each of the class

*please hlep me on this

-Mohan
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Hi Mohan!
The two classes have same name but vary in terms of their member fields and memeber methods. I mean context varies with the package they are in. Why dont you try locating the two, in Java Docs (API)... Ummm wait....


java.util.date
java.sql.date

Also concentrate in the class hierarchy.
java.lang.Object
extended by java.util.Date
extended by java.sql.Date

Hope this two links should do good.


[ July 28, 2005: Message edited by: Akhil Trivedi ]
[ July 28, 2005: Message edited by: Akhil Trivedi ]

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Mohan Vinukonda
Ranch Hand

Joined: Jul 28, 2005
Posts: 32
Hi Akhil Trivedi,
Thank you
Since two packages having this class(sql and util) I want to know that, where could we use this Date class in which senario
please explain me indetail

-Mohan
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Since two packages having this class(sql and util) I want to know that, where could we use this Date class in which senario
please explain me indetail

The API explains the difference. Was there something about it you found confusing? If so, please post your question.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Regarding Date Class