[Solved] why we use next() method in java? [duplicate]
It moves (or tries to, returning a boolean telling whether it succeeded or not) the resultset cursor forward. The count variable is useless, since you can just write if(rs.next()) to determine which message is shown. 6 solved why we use next() method in java? [duplicate]