Both Italy and Germany were united as a result of various wars that were won by the militaries of their most prominent states.
Italy
Italy was unified as a result of the efforts of the ambitious Giuseppi Garibaldi and the state of Piedmont-Sardinia which:
All these military actions led to the Kingdom of Italy being united and coming into being.
Germany
Germany was united under the skillful diplomacy of Otto von Bismarck who knew when and how to use the powerful Prussian military to:
And so Germany came into being thanks to the efforts of the military once again.
Find out more from https://brainly.com/question/9330622.