For a country to be considered landlocked, it must be completely enclosed by land governed by other countries or only have coastal access to a closed sea. There are 48 countries in the world that are considered landlocked. While only two of these countries lie outside of the continents of Europe, Asia, and Africa, Germany is not one of them, despite errant claims that it is.
So, how do you determine if a country is landlocked? The easiest way to tell if a country is landlocked is to take a look at a map of the country and the surrounding geography. For example, in the map below, you can see that Northern Germany, with an extensive coastline facing the North and Baltic seas, certainly does not meet the definition of a landlocked country. Depending how it is measured (see the coastline paradox for more clarification about coastline measurement discrepancies), Northern Germany has over 3,700 kilometers of coastline.
Germany does, however, border several countries that are landlocked: Austria, Czech Republic, Luxembourg, and Switzerland.