Recursive reading of List<Object>

前端 未结 5 1736
滥情空心
滥情空心 2020-12-17 07:18

I have this structure of List, to be specific it is a \"CategoryItem\" Object. Here\'s my declaration of \"CategoryItem\" Object.

         


        
      
      
      
5条回答
  •  余生分开走
    2020-12-17 08:07

    Read up on recursion. There are quite a few samples out there. The ones on Wikipedia are simple but the principle is the same: solve the problem on one "level", then call the same method recursively on each sublevel.

提交回复
热议问题