Once this sketch is uploaded to the board opening up the Serial Monitor should show something like this:
This works but the problem with the DHT11 sensor can be seen in this screenshot, the temperature is fluctuating between 19oC and 22oC, this sensor is just not very accurate, certainly not accurate enough to work in a weather station.
DHT22 is slightly bigger than DHT11 as you can see in this photo. The pin layout is exactly the same as the DHT11 and it needs connecting in exactly the same way as for the DHT11. Don’t forget to update the DHTtester sketch to use DHT22!