Since 2002 Germany has a new immigration law. As a foreign student you will receive a study visa. With this visa you are allowed to work 90 days or 180 half days in a calendar year. This right is not restricted for campus jobs like in the US. After your graduation you have the right to stay in Germany for one year. During this time you can concentrate on job-hunting. A permanent residence permit will be guaranteed after having been successful in finding a job.