i want to check if the username given by user is my database (Mysql workbench) or not thus i wrote the method like
{ while(rs.next()) { if(rs.getString(1).equals(username)) { System.out.println("already exsist"); System.out.println("Please enter another name:"); username = s.nextLine(); checkUsernameExist(rs,username); } } }```i recursively called the same method until i get a unique name from the user. My problem is when i call the method 'checkUsernameExist' the parameter rs wants to be re-initialized or move one step upward in the table. What should i do now?& This is what i gotEnter the username: namealready exsistPlease enter another name:namealready exsistPlease enter another name:namei want to continue my loop until i get a unique name