import java.sql.*;


public class HelpOperate
{

    public HelpOperate()
    {
    }

    public UserBean getUser(Connection conn)
        throws Exception
    {
        UserBean user = new UserBean();
        Statement stmt = conn.createStatement();
        String sql = "select * from test";
        ResultSet rs;
        String password;
        for(rs = stmt.executeQuery(sql); rs.next(); user.setPassword(password))
        {
            String name = rs.getString(0);
            password = rs.getString(1);
            user.setName(name);
        }

        rs.close();
        stmt.close();
        conn.close();
        return user;
    }
}