Modern Danish trains have WIFI. Of course not a good WIFI system but it works for some. However the WIFI systems can cost you a fine.
See. In Danish trains it is forbidden to purchase tickets. You have to purchase them at the stations before you enter the trains. Because the machines on stations are often broken, people purchase tickets using their Smartphones.
However because people tend to authorize their Smartphones of the trains WIFI systems and Smartphones constantly are looking for WIFI connections you can purchase a ticket on the train without noticing it standing next to the train.
Looking up the problem the advice is to purchase your ticket at home before you leave for the station. There it no knowledge of how far the WIFI systems on the trains reach. Is it 5 meters from the train, 10 meters or 25? You cannot know.
Be safe. Purchase paper tickets or use your car if you have doubt in the functionality of the tickets machines.