to get the upper hand

Meaning 1
to win or begin a sport by having the last hand hold on a stick or a bat
Sentence 1
Johnny got the upper hand and said he wanted to bat.
Meaning 2
to have an advantage
Sentence 2
The development of the nuclear bomb gave the United States the upper hand in the Second World War.