Share my clean and easy java solution
    public class Solution {\n        public List<List<Integer>> levelOrder(TreeNode root) {\n           List<List<Integer>> result = new ArrayList<List<Integer>
        public class Solution {\n        public List<List<Integer>> levelOrder(TreeNode root) {\n           List<List<Integer>> result = new ArrayList<List<Integer>>();\n           \n           if(root == null){\n              return result;\n           }\n           \n           Queue<TreeNode> queue = new LinkedList<TreeNode>();\n           queue.offer(root);\n           \n           int curL = 0;\n           while(!queue.isEmpty()){\n               List<Integer> levelRs = new ArrayList<Integer>(); \n               curL = queue.size();\n               for(int i=0;i<curL;i++){\n                   TreeNode peek = queue.poll();\n                   levelRs.add(peek.val);\n                   if(peek.left!=null){\n                       queue.offer(peek.left);\n                   }\n                   if(peek.right!=null){\n                       queue.offer(peek.right);\n                   }\n               }\n               result.add(levelRs);\n           }\n           \n           return result;\n        }  \n    }
['Java']