der Admiral
admiral
One of the highest military ranks for officers in the navy.
Der Admiral gab der Flotte den Befehl zum Auslaufen.
The admiral gave the fleet the order to set sail.

admiral
Loading your saved state.
admiral
One of the highest military ranks for officers in the navy.
Der Admiral gab der Flotte den Befehl zum Auslaufen.
The admiral gave the fleet the order to set sail.

The two meanings are clearly separated by context. If the sentences talk about the military, ships, or the navy, the officer is meant. If they are about nature, the garden, insects, or colors, the butterfly is meant.
Der Admiral inspizierte die Flotte im Hafen.
The admiral inspected the fleet in the harbor.
In the military meaning, 'Admiral' refers to one of the highest officer ranks exclusively in the navy. It is the counterpart to a general in the army or air force.
Der Admiral befehligte die gesamte Marineoperation.
The admiral commanded the entire naval operation.
The butterfly 'Admiral' (red admiral) is often found in late summer and autumn. It is attracted to ripe fruit, which is why you often see it on apples or pears lying on the ground.
Im Garten saßen mehrere Admirale auf den überreifen Pflaumen.
Several red admirals were sitting on the overripe plums in the garden.
general
'der General' and 'der Admiral' both refer to very high military ranks. The difference lies in the branch of the military: a general belongs to the army or the air force. An admiral belongs to the navy, that is, the naval forces. Learners may confuse the words because both are high-ranking officers and have similar responsibilities. When it is about land or air, 'General' is more natural; when it is about ships or the navy, 'Admiral' is correct.

Der Admiral gab den Schiffen im Hafen neue Befehle.
The admiral gave the ships in the harbor new orders.
Der General plante den Einsatz der Truppen an Land.
The general planned the deployment of the troops on land.