The Preacher has a right to speak about this, for he is not foolish and has gained a lot of wisdom through experience. After all, people from all over the world are coming to him precisely to admire his wisdom.
When you take the time to attentively read the text of the book of Ecclesiastes, it becomes evident that when it comes to the authorship of this book there is only one candidate. What we read in this verse is important in this regard: “I have acquired great wisdom, surpassing all who were over Jerusalem before me, and my heart has had great experience of wisdom and knowledge.” The king in question reigned in Jerusalem. This king is a son of David (Ecclesiastes 1:1). According to Ecclesiastes 1:12 he reigns over Israel in Jerusalem. This means that any descendants of David after Solomon are not to be considered candidates, for they reigned either over the Kingdom of the two tribes only, or over the ten tribes.
16 I said in my heart, “I have acquired great wisdom, surpassing all who were over Jerusalem before me, and my heart has had great experience of wisdom and knowledge.”