java.sql.Date extends the java.util.Date so you can cast the java.sql.Date instance to it's superclass java.util.Date. But you can not always cast in the other way - if the instance is of type java.util.Date it is not sure it is of type java.sql.Date. You can use the instanceof operator.
----- Original Message ----- From: "Emmanuel Eze" <[EMAIL PROTECTED]> To: "JDJList" <[EMAIL PROTECTED]> Sent: Tuesday, May 07, 2002 12:08 PM Subject: [jdjlist] casting > This cast thing is beginning to get me confused. if I cannot cast a > java.util.Date to a java.sql.Date since the util.Date is the ancestor class, > can I cast a java.sql.Date to java.util.Date. I really wish to understand > the nitty gritty of casting. > > > To change your membership options, refer to: > http://www.sys-con.com/java/list.cfm > To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
