40.000 Euro gross amounts to 2000 Euro per month in net-salary. My living costs in Berlin would be around 800 Euro.
I chose to go to Zurich instead. Here, I am making 92.000 CHF also as a junior web-dev. Due to the low taxes, my net-salary is 6.500 CHF and I live on 1300 CHF all-in.
Zurich is the only place in Europe where salaries are comparable to NYC or the Bay-Area. If you are interested in moving here to work in IT, shoot me a mail. Contact details can be found in my HN profile. Alternatively, check out my medium-story: "Eight reasons why I moved to Switzerland" (http://goo.gl/EIX4UX).