Code example for ResultSet

Methods: closegetStringnext

0
 
		PreparedStatement ps = c.prepareStatement("select * from users where id = ?");
		ps.setString(1, id);
 
		ResultSet rs = ps.executeQuery();
		rs.next();
 
		User user = new User();
		user.setId(rs.getString("id"));
		user.setName(rs.getString("name"));
		user.setPassword(rs.getString("password"));
 
		rs.close();
		ps.close();
		c.close();
 
		return user;
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java