如何获得ResultSet记录集中记录的条数?
如何获得ResultSet记录集中记录的条数? 
 是有一个方法吧? 
 请高手指教!
------解决方案--------------------rs.last(); 
 int r = rs.getRow();
------解决方案--------------------select count(*) from table     
 rs.next(); 
 rs.getInt(1);
------解决方案--------------------int count = 0; 
 while(rs.next()) 
 { 
    count ++; 
 }
------解决方案--------------------方法1: 
 int a=rs.getRow(); 
 方法2: 
 int a = 0; 
 while(rs.next()) 
 { 
    a ++; 
 }