Denmark men's handball team qualified for the Olympics by winning the gold medal and securing an outright berth at the final match of the 2019 World Championships in Herning.