当前位置: 技术问答>java相关
大家帮我看看这个问题﹐类型不匹配﹐该怎么解决﹖
来源: 互联网 发布时间:2015-09-10
本文导语: DBConnectionManager.java:237: reference to Date is ambiguous, both class java.sql.Date in java.sql and class java.util.Date in java.util match log.println(new Date() + ": " + msg); ------------------------------------------------- import java.util.*; import ...
DBConnectionManager.java:237: reference to Date is ambiguous, both class java.sql.Date in java.sql and class java.util.Date in java.util match log.println(new Date() + ": " + msg);
-------------------------------------------------
import java.util.*;
import java.sql.*;
...
private void log(String msg) {
log.println(new Date() + ": " + msg);
}
...
-------------------------------------------------
import java.util.*;
import java.sql.*;
...
private void log(String msg) {
log.println(new Date() + ": " + msg);
}
...
|
import java.util.*;
import java.sql.*;
...
private void log(String msg) {
log.println(new java.util.Date() + ": " + msg);
}
import java.sql.*;
...
private void log(String msg) {
log.println(new java.util.Date() + ": " + msg);
}