This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes what's the difference? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "what Watch "what New topic
Author

what's the difference?

zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
hello
i don't know the difference between the "java.sql.Data" and "java.util.Date",i mean how can i decide when i use which?
thank you!
Pete Lyons
Ranch Hand

Joined: Aug 18, 2002
Posts: 109
Use java.util.Date for most of your normal programming needs. java.sql.Date is part of JDBC and involved with databases, etc.
zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
thanks for your helps
could you tell me how the "java.sql.Date" involve with database?
for example,i can use the "java.sql.Date" to receive the oracle Date type field,but "java.sql.Date" can't.
zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
or sorry,my typing mistake.
i can use the "java.util.Date" to receive the oracle Date type field,but "java.sql.Date" can't.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what's the difference?
 
It's not a secret anymore!