新手很困惑,谁能帮我看看 这是tomcat的问题把class文件放在classes下的一个目录,并在该class文件前加入 package xxx; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把checkEnrol放到一个包里.试试.. 同样还有一个数据库操作的javabean也是直接存在classes目录下,在应用时没有出现问题,是为什么呢?错误代码表示的是我定义的javabean不可用是吗 如果一个javabean过程中还要调用另外一个javabean的方法,其中的引用声明是不是也是一样的呢 checkenrol过程中要连接数据库,public boolean hasLogin(String stu_id,String cour_id){ //该学生是否已经注册该课程 boolean f=true; String sql="select stu_id,class_id "+ "from enrol,classes "+ "where stu_id='"+stu_id+"' "+ "and classes.id=enrol.class_id "+ "and cour_id='"+cour_id+"' "; sqlBean db =new sqlBean(); try{ ResultSet rs=db.executeQuery(sql); if(rs.next()){ f=false;} else{ f=true;} }catch(Exception e){ e.getMessage();} return f; }其中的数据库操作是sqlbean定义的,上面有什么问题吗? 关于窗体 循环语句中的变量是什么意思 Integer 问题?很奇怪! 请大家指点. 我是新手 急!高分救助:如何让窗口里的控件随着窗口的缩放也跟着缩放!万分感谢! 关于JAVA读取文件属性的问题 用了enterprisedt的ftp client包,结果发现不能下载大文件 求救! 谁能告诉我SOFT 和WEAK REFERENCE 的回收机制,有例子最好! IDEA代码编辑后无法运行 高手看一下我的代码,为什么会有这错误 一些关于nio的问题和HTTP请求的问题
错误代码表示的是我定义的javabean不可用是吗
public boolean hasLogin(String stu_id,String cour_id){ //该学生是否已经注册该课程
boolean f=true;
String sql="select stu_id,class_id "+
"from enrol,classes "+
"where stu_id='"+stu_id+"' "+
"and classes.id=enrol.class_id "+
"and cour_id='"+cour_id+"' ";
sqlBean db =new sqlBean();
try{
ResultSet rs=db.executeQuery(sql);
if(rs.next()){ f=false;}
else{ f=true;}
}catch(Exception e){ e.getMessage();}
return f;
}
其中的数据库操作是sqlbean定义的,上面有什么问题吗?