True, but at the same time immigrants have nothing to lose and everything to gain, thus in many cases they will work harder/longer and as result often be more skilled than an average developer.
And in general skilled immigration has many times over been proven to only benefit the country and that java developer you mention.