这是什么原因呢?
来源:百度知道 编辑:UC知道 时间:2024/05/05 05:59:54
package bookshop;
import java.sql.*;
import bookshop.*;
public class DBSQLManager{
protected Connection conn = null; //Connection对象
protected Statement stmt = null; //Statement对象
protected ResultSet rs = null; //记录结果集
protected String sqlStr; //SQL语句
public DBSQLManager() {
try
{
sqlStr = "";
DBConnectionManager dcm = new DBConnectionManager();
conn = dcm.getConnection();
stmt = conn.createStatement();
}
catch (Exception e) {
System.out.println(e);
}
}
出错提示:
D:\JAVA\151\jsp下载资料\第11章\DBSQLManager.java:16: cannot find symbol
symbol : class DBConnectionManager
location: class bookshop.DBSQLManager
DBConnectionManager dcm = new DBConnectionManager();
^
D:\JAVA\151\jsp下载资料\第11章\DBSQLManager.java:16: cannot find symbol
import java.sql.*;
import bookshop.*;
public class DBSQLManager{
protected Connection conn = null; //Connection对象
protected Statement stmt = null; //Statement对象
protected ResultSet rs = null; //记录结果集
protected String sqlStr; //SQL语句
public DBSQLManager() {
try
{
sqlStr = "";
DBConnectionManager dcm = new DBConnectionManager();
conn = dcm.getConnection();
stmt = conn.createStatement();
}
catch (Exception e) {
System.out.println(e);
}
}
出错提示:
D:\JAVA\151\jsp下载资料\第11章\DBSQLManager.java:16: cannot find symbol
symbol : class DBConnectionManager
location: class bookshop.DBSQLManager
DBConnectionManager dcm = new DBConnectionManager();
^
D:\JAVA\151\jsp下载资料\第11章\DBSQLManager.java:16: cannot find symbol
可能杀毒之后,你把系统有效的文件不小心删除了
你系统恢复一下试试看
不行的话,就得重装系统了
DBConnectionManager在哪里放着
导入它。。。。。