How to repeat the while Statement in java
try
{
while(rs.next())
{
exx = rs.getInt("ID");
exxx = Integer.toString(exx);
if( empid.getText().equals(exxx))
{
String names = rs.getString("NAME");
ename.setText(names);
} break;
}
}
catch (SQLException err)
{
JOptionPane.showMessageDialog(null, err.getMessage());
}