What I\'m trying to do is:
Accept username(uname) and password(passw) as an input from the user.
Using ResultSet, retrieve the
ResultSet
You are supposed to use the result of rs.next() :
rs.next()
if (rs.next()) { n=rs.getString("id"); m=rs.getString("pass"); }
If rs.next() returns false, this means the query returned no rows.