帮我看看这个程序哪里有错
帮我看看这个程序哪里有错
<%
public static boolean isSubstring(String a,String b) // 判断b是不是a的子字符串
{
int i;
String sub;
for(i=0;i<a.length()-b.length();i++)
{
sub=a.substring(i,i+b.length());
if (sub.equals(b))
return(true);
}
return(false);
}
String JYFW=table.convertCode(request.getParameter("JYFW"));
String Strsql="select dmnr=dmcc from jjhk_dmb where dmlx ='tdhy'";
ResultSet rs=dbc.executeQuery(Strsql);
String al[]=null;
while(rs.next())
{
int rscount =rs.getRow();
for(int i=0;i>rscount.length();i++)
{
al[]=rs.getString(i);
}
}
for(int i=0 ;i<al.length();i++)
{
isSubstring Sub=new isSubstring(String a,String b);
if(Sub(al[i],JYFW)==true)
{
out.print(al[i]);
return ;
}
}
%>