A bookish approach says that the Great Wall of China is roughly over 2,300 years old with the very first wall having been put up in 221 BCE during the period of the Qin Dynasty.
But in actual, there is no definite answer to this question because even before the actual construction of the Great Wall of China started, there was similar kind of walls to stop foreign invasions. Qin Dynasty (221-227 BCE)is considered to take the initiative of constructing a single wall but historical records say something else.
The initiative of construction of the wall is linked to the 7th century BCE when the state of Chu began to construct an enduring defensive system for China known as the “Square Wall.” This idea was proposed for northern sides but from the 6th to the 4th century other states followed Chu’s concept. In the southern part of China in Qi state, an extensive perimeter wall on the same concept was constructed using present river dikes, earth and stone and ended at the shores of the Yellow Sea.
Similarly in the Zhongshan state, a wall was created to prevent invasion from the southwest states of Zhao and Qin. The wall system had two defensive lines in the Wei state naming the Hexi and Henan walls.
The Zheng state of China also constructed a wall system for defense purpose which was later rebuilt by the Han state after it seized Zheng.