Inherited from Old Spanish necedad, neciedad, equivalent to necio + -dad.
Practice speaking and memorizing "necedad" and many other words and sentences in Spanish.