各位看看这是什么错误,帮忙解决看,谢谢!
package bean;
import java.sql.*;
public class Bean extends Dcl {
//以下是用户表操作部分
public boolean adduser(){
boolean bu_adduser=false;
try{
String usersql= "insert into username(name,password,dept,pop) values( "+name+ ", "+password+ ", "+dept+ ", "+pop+ ") ";
if(super.insert(usersql))bu_adduser=true;
}catch(Exception e){
System.out.println( "增加用户失败 ");
}finally{
return bu_adduser;
}
}
public String getName(){
return name;
}
public void setName(String name){
this.name=name;
}
public String getPassword(){
return password;
}
public void setPassword(String password){
this.password=password;
}
public String getDept(){
return dept;
}
public void setDept(String dept){
this.dept=dept;
}
public String getPop(){
return pop;
}
public void setPop(String pop){
this.pop=pop;
}
}
下面是编译时报的错误:
Bean.java:5: cannot resolve symbol
symbol : class Dcl
location: class bean.Bean
public class Bean extends Dcl {
^
Bean.java:10: cannot resolve symbol
symbol : variable name
location: class bean.Bean
String usersql= "insert into username(name,password,dept,pop) values( "+na
me+ ", "+password+ ", "+dept+ ", "+pop+ ") ";
^
Bean.java:10: cannot resolve symbol
symbol : variable password
location: class bean.Bean
String usersql= "insert into username(name,password,dept,pop) values( "+na
me+ ", "+password+ ", "+dept+ ", "+pop+ ") ";
^
Bean.java:10: cannot resolve symbol
symbol : variable dept
location: class bean.Bean
String usersql= "insert into username(name,password,dept,pop) values( "+na
me+ ", "+password+ ", "+dept+ ", "+pop+ ") ";
^