I think the best way to learn German is to visit a language course, because German grammar is really difficult to learn by yourself. If you plan to go to Germany for a year, you should take the opportunity to visit a language school with German native speakers as teachers.