וַיִּקְרָ֤א יְהוֹשֻׁ֙עַ֙ לְכָל־יִשְׂרָאֵ֔ל לִזְקֵנָיו֙ וּלְרָאשָׁ֔יו וּלְשֹׁפְטָ֖יו וּלְשֹֽׁטְרָ֑יו וַיֹּ֣אמֶר אֲלֵהֶ֔ם אֲנִ֣י זָקַ֔נְתִּי בָּ֖אתִי בַּיָּמִֽים׃
that Joshua called for all Israel, for their elders and for their heads, and for their judges and for their officers, and said unto them: ‘I am old and well stricken in years.
Read midrashic interpretation of Joshua 23:2: and classical rabbinic exegesis.