• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Date Class

 
Mohan Vinukonda
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Mohan Vinukonda
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic