Friday, March 13, 2009

How can u avoid the conflict between java.util.Date and

Question :How can u avoid the conflict between java.util.Date and
java.sql.Date? (JavaUtil)

Answer :If your code has to use both java.util.Date and java.sql.Date in the same
class,
Depending on number of times you are using these classes you can import
any one of the
package. e.g. Assume you are using java.util.Date for 5 times in your code
and you are
using java.sql.Date only for one time then import java.util.* and for using
java.sql.Date
use java.sql.Date sDate = new java.sql.Date();

No comments: