The method add(int, Object) in the type ArrayList is not applicable for the
Stringsql="select*fromhaoyouwhereuserId="+userId;conn=DBConn.getConn();try{st=conn.cr...
String sql = "select * from haoyou where userId="+userId;
conn = DBConn.getConn();
try
{
st = conn.createStatement();
rs = st.executeQuery(sql);
while(rs.next())
{
int haoyouId=rs.getInt("haoyouId");
haoyouIdList.add(haoyouId);
}
}
其中haoyouIdList.add(haoyouId); add出错!
求大神指导 展开
conn = DBConn.getConn();
try
{
st = conn.createStatement();
rs = st.executeQuery(sql);
while(rs.next())
{
int haoyouId=rs.getInt("haoyouId");
haoyouIdList.add(haoyouId);
}
}
其中haoyouIdList.add(haoyouId); add出错!
求大神指导 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询